forked from Minki/linux
9d09e663d5
This patch is the skeleton for the DM target that will be the bridge from DM to MD (initially RAID456 and later RAID1). It provides a way to use device-mapper interfaces to the MD RAID456 drivers. As with all device-mapper targets, the nominal public interfaces are the constructor (CTR) tables and the status outputs (both STATUSTYPE_INFO and STATUSTYPE_TABLE). The CTR table looks like the following: 1: <s> <l> raid \ 2: <raid_type> <#raid_params> <raid_params> \ 3: <#raid_devs> <meta_dev1> <dev1> .. <meta_devN> <devN> Line 1 contains the standard first three arguments to any device-mapper target - the start, length, and target type fields. The target type in this case is "raid". Line 2 contains the arguments that define the particular raid type/personality/level, the required arguments for that raid type, and any optional arguments. Possible raid types include: raid4, raid5_la, raid5_ls, raid5_rs, raid6_zr, raid6_nr, and raid6_nc. (again, raid1 is planned for the future.) The list of required and optional parameters is the same for all the current raid types. The required parameters are positional, while the optional parameters are given as key/value pairs. The possible parameters are as follows: <chunk_size> Chunk size in sectors. [[no]sync] Force/Prevent RAID initialization [rebuild <idx>] Rebuild the drive indicated by the index [daemon_sleep <ms>] Time between bitmap daemon work to clear bits [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization [max_write_behind <value>] See '-write-behind=' (man mdadm) [stripe_cache <sectors>] Stripe cache size for higher RAIDs Line 3 contains the list of devices that compose the array in metadata/data device pairs. If the metadata is stored separately, a '-' is given for the metadata device position. If a drive has failed or is missing at creation time, a '-' can be given for both the metadata and data drives for a given position. Examples: # RAID4 - 4 data drives, 1 parity # No metadata devices specified to hold superblock/bitmap info # Chunk size of 1MiB # (Lines separated for easy reading) 0 1960893648 raid \ raid4 1 2048 \ 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 # RAID4 - 4 data drives, 1 parity (no metadata devices) # Chunk size of 1MiB, force RAID initialization, # min recovery rate at 20 kiB/sec/disk 0 1960893648 raid \ raid4 4 2048 min_recovery_rate 20 sync\ 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 Performing a 'dmsetup table' should display the CTR table used to construct the mapping (with possible reordering of optional parameters). Performing a 'dmsetup status' will yield information on the state and health of the array. The output is as follows: 1: <s> <l> raid \ 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> Line 1 is standard DM output. Line 2 is best shown by example: 0 1960893648 raid raid4 5 AAAAA 2/490221568 Here we can see the RAID type is raid4, there are 5 devices - all of which are 'A'live, and the array is 2/490221568 complete with recovery. Cc: linux-raid@vger.kernel.org Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
44 lines
1.5 KiB
Makefile
44 lines
1.5 KiB
Makefile
#
|
|
# Makefile for the kernel software RAID and LVM drivers.
|
|
#
|
|
|
|
dm-mod-y += dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
|
|
dm-ioctl.o dm-io.o dm-kcopyd.o dm-sysfs.o
|
|
dm-multipath-y += dm-path-selector.o dm-mpath.o
|
|
dm-snapshot-y += dm-snap.o dm-exception-store.o dm-snap-transient.o \
|
|
dm-snap-persistent.o
|
|
dm-mirror-y += dm-raid1.o
|
|
dm-log-userspace-y \
|
|
+= dm-log-userspace-base.o dm-log-userspace-transfer.o
|
|
md-mod-y += md.o bitmap.o
|
|
raid456-y += raid5.o
|
|
|
|
# Note: link order is important. All raid personalities
|
|
# and must come before md.o, as they each initialise
|
|
# themselves, and md.o may use the personalities when it
|
|
# auto-initialised.
|
|
|
|
obj-$(CONFIG_MD_LINEAR) += linear.o
|
|
obj-$(CONFIG_MD_RAID0) += raid0.o
|
|
obj-$(CONFIG_MD_RAID1) += raid1.o
|
|
obj-$(CONFIG_MD_RAID10) += raid10.o
|
|
obj-$(CONFIG_MD_RAID456) += raid456.o
|
|
obj-$(CONFIG_MD_MULTIPATH) += multipath.o
|
|
obj-$(CONFIG_MD_FAULTY) += faulty.o
|
|
obj-$(CONFIG_BLK_DEV_MD) += md-mod.o
|
|
obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o
|
|
obj-$(CONFIG_DM_CRYPT) += dm-crypt.o
|
|
obj-$(CONFIG_DM_DELAY) += dm-delay.o
|
|
obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o
|
|
obj-$(CONFIG_DM_MULTIPATH_QL) += dm-queue-length.o
|
|
obj-$(CONFIG_DM_MULTIPATH_ST) += dm-service-time.o
|
|
obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o
|
|
obj-$(CONFIG_DM_MIRROR) += dm-mirror.o dm-log.o dm-region-hash.o
|
|
obj-$(CONFIG_DM_LOG_USERSPACE) += dm-log-userspace.o
|
|
obj-$(CONFIG_DM_ZERO) += dm-zero.o
|
|
obj-$(CONFIG_DM_RAID) += dm-raid.o
|
|
|
|
ifeq ($(CONFIG_DM_UEVENT),y)
|
|
dm-mod-objs += dm-uevent.o
|
|
endif
|