Coder Social home page Coder Social logo

flashcachegroup's Introduction

flashcachegroup (fcg)

fcg makes fb's flashcache to cache a group of disks with one or multiple SSDs.

Group of hard disk(s) can be dynamically created , and caching can be applied on the group instead of each individual disk.

Hard disk(s) can be dynamically added to or removed from the group on demand.

In case of failure(s), SSD(s) can be replaced transparently, without interrupting upper layers.

Principle

Figure 1(a) shows the structure of a cached group of HDs, and figure 1(b) adds some explanation, which can be described as follow:

1. Fcg respectively combines the group of HDs and all the SSDs, with dm-linear.

2. Fcg invokes flashcaceh-create to cache the group of HDS with SSDs.

3. Fcg splites the hard disks out from the cached group, with dm-linear too.

alt tag

figure 1(a)

alt tag

figure 1(b)

Usage(fcg)

fcg create [-h] [-g GROUP] [-c CACHEDEV [CACHEDEV ...]] [-b BLOCKSIZE] [-p PATTERN]

fcg delete [-h] [-g GROUP]

fcg add [-h] [-g GROUP] [-d DISK]

fcg remove [-h] [-g GROUP] [-d DISK]

Usage(fcg-easy)

to create a new group by using hard disks:

fcg-easy create [-h] [-g GROUP] [-d DISK [DISK ...]]
                [-c CACHEDEV [CACHEDEV ...]] [-b BLOCKSIZE] [-s SIZE]
                [-p PATTERN] [-y] [--skip SKIP] [--discard] [--trim]

to delete an UNUSED group:

fcg-easy delete [-h] [-g GROUP] [-y]

to replace broken SSDs:

fcg-easy rep-ssd [-h] [-g GROUP] [-c CACHEDEV [CACHEDEV ...]]

Requirements

Python

Python 2.6 and 2.7 (does NOT support Python 3.x)

Modules

  • flashcache
  • pydm

Installation

The easiest way to install is with pip::

sudo pip install flashcachegroup

Or manually (assuming all required modules are installed on your system)::

sudo python ./setup.py install

Change log

v0.6.6:

  1. roll back if failed when create fcg.
  2. simplify code.

v0.3.0:

rewrite fcg and separate dmsetup to pydm

v0.2.10:

add -s -b -p --skip --discard --trim arguments when create fcg

flashcachegroup's People

Contributors

lihuiba avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.