[sheepdog] [PATCH 0/8] add basic raid support

Liu Yuan namei.unix at gmail.com
Sun Mar 10 15:19:21 CET 2013


From: Liu Yuan <tailai.ly at taobao.com>

This patch set implements the basic RAID support that aims to manage multiple
disks in one node. 

The basic idea of this RAID is implement RAID-0 like mechanism that distributes
sheep objects on the local disks without parity or replicating, which instead 
relies on the sheepdog's replicated storage to recover the lost objects on the 
faulty disk.

The raid module use a private consistent hash ring per sheep for object
distributing, which allow raid layer completely transparent to sheep node
managent. This means that hot plug/unplug the disk (include faulty disks) to the
local sheep won't cause object movement between the nodes.

This series just implement basic object distribution control of raid module. The
missing part is internal object recovery between local disks inside the node and
collie command to hot plug/unplug the disk into the sheep daemon, which is meant
to be written by the next series.

To enable raid:
 $ sheep /path/to/meta-store,/path/to/disk1,/path/to/disk2[,...]

We need pass meta-store, which holds sheep's meta information like epoch, config
as the first parameter.

 $ sheep /path/to/store # works the same as before, which doesn't enable raid at all.

Liu Yuan (8):
  raid: add dummy raid proper
  util: add a helper to purge directory
  sheep, farm: adapt to raid support
  sheep: teach stat_sheep to be raid friendly
  tests: teach tests to test raid feature
  tests/052: fix a spurious failure
  plain: refine init() interface
  tests: disable raid for tests that are not raid aware

 include/util.h      |    2 +
 lib/util.c          |   89 ++++++++++-------
 sheep/Makefile.am   |    4 +-
 sheep/farm/farm.c   |   70 +++++---------
 sheep/farm/trunk.c  |   57 +++++------
 sheep/group.c       |    2 +-
 sheep/ops.c         |   44 +++------
 sheep/plain_store.c |  147 ++++++++++++----------------
 sheep/raid.c        |  269 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sheep/sheep.c       |   12 ++-
 sheep/sheep_priv.h  |   22 +++--
 sheep/store.c       |   61 ++++++++----
 tests/010           |    2 +
 tests/027           |    2 +
 tests/032           |    2 +
 tests/033           |    2 +
 tests/042           |    2 +
 tests/043           |    2 +
 tests/047           |    2 +
 tests/048           |    2 +
 tests/052           |    1 +
 tests/check         |    9 ++
 tests/common.rc     |    6 +-
 23 files changed, 551 insertions(+), 260 deletions(-)
 create mode 100644 sheep/raid.c

-- 
1.7.9.5




More information about the sheepdog mailing list