2005-04-17 00:20:36 +02:00
|
|
|
#
|
|
|
|
# Makefile for the kernel software RAID and LVM drivers.
|
|
|
|
#
|
|
|
|
|
2009-03-31 05:27:02 +02:00
|
|
|
dm-mod-y += dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
|
2013-08-16 16:54:23 +02:00
|
|
|
dm-ioctl.o dm-io.o dm-kcopyd.o dm-sysfs.o dm-stats.o
|
2009-03-31 05:27:02 +02:00
|
|
|
dm-multipath-y += dm-path-selector.o dm-mpath.o
|
|
|
|
dm-snapshot-y += dm-snap.o dm-exception-store.o dm-snap-transient.o \
|
2009-01-06 04:05:17 +01:00
|
|
|
dm-snap-persistent.o
|
2009-03-31 05:27:02 +02:00
|
|
|
dm-mirror-y += dm-raid1.o
|
2009-06-22 11:12:35 +02:00
|
|
|
dm-log-userspace-y \
|
|
|
|
+= dm-log-userspace-base.o dm-log-userspace-transfer.o
|
2011-10-31 21:21:18 +01:00
|
|
|
dm-thin-pool-y += dm-thin.o dm-thin-metadata.o
|
2013-03-01 23:45:51 +01:00
|
|
|
dm-cache-y += dm-cache-target.o dm-cache-metadata.o dm-cache-policy.o
|
2013-03-01 23:45:51 +01:00
|
|
|
dm-cache-mq-y += dm-cache-policy-mq.o
|
2015-05-15 16:33:34 +02:00
|
|
|
dm-cache-smq-y += dm-cache-policy-smq.o
|
2013-03-01 23:45:52 +01:00
|
|
|
dm-cache-cleaner-y += dm-cache-policy-cleaner.o
|
2014-03-03 16:23:15 +01:00
|
|
|
dm-era-y += dm-era-target.o
|
2015-12-03 21:36:00 +01:00
|
|
|
dm-verity-y += dm-verity-target.o
|
2009-03-31 05:27:02 +02:00
|
|
|
md-mod-y += md.o bitmap.o
|
raid5: add basic stripe log
This introduces a simple log for raid5. Data/parity writing to raid
array first writes to the log, then write to raid array disks. If
crash happens, we can recovery data from the log. This can speed up
raid resync and fix write hole issue.
The log structure is pretty simple. Data/meta data is stored in block
unit, which is 4k generally. It has only one type of meta data block.
The meta data block can track 3 types of data, stripe data, stripe
parity and flush block. MD superblock will point to the last valid
meta data block. Each meta data block has checksum/seq number, so
recovery can scan the log correctly. We store a checksum of stripe
data/parity to the metadata block, so meta data and stripe data/parity
can be written to log disk together. otherwise, meta data write must
wait till stripe data/parity is finished.
For stripe data, meta data block will record stripe data sector and
size. Currently the size is always 4k. This meta data record can be made
simpler if we just fix write hole (eg, we can record data of a stripe's
different disks together), but this format can be extended to support
caching in the future, which must record data address/size.
For stripe parity, meta data block will record stripe sector. It's
size should be 4k (for raid5) or 8k (for raid6). We always store p
parity first. This format should work for caching too.
flush block indicates a stripe is in raid array disks. Fixing write
hole doesn't need this type of meta data, it's for caching extension.
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: NeilBrown <neilb@suse.com>
2015-08-13 23:31:59 +02:00
|
|
|
raid456-y += raid5.o raid5-cache.o
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
# Note: link order is important. All raid personalities
|
2007-07-09 20:56:42 +02:00
|
|
|
# and must come before md.o, as they each initialise
|
2005-04-17 00:20:36 +02:00
|
|
|
# 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
|
2007-07-09 20:56:42 +02:00
|
|
|
obj-$(CONFIG_MD_RAID456) += raid456.o
|
2005-04-17 00:20:36 +02:00
|
|
|
obj-$(CONFIG_MD_MULTIPATH) += multipath.o
|
|
|
|
obj-$(CONFIG_MD_FAULTY) += faulty.o
|
2014-03-07 18:21:15 +01:00
|
|
|
obj-$(CONFIG_MD_CLUSTER) += md-cluster.o
|
2013-03-24 00:11:31 +01:00
|
|
|
obj-$(CONFIG_BCACHE) += bcache/
|
2005-06-22 02:17:14 +02:00
|
|
|
obj-$(CONFIG_BLK_DEV_MD) += md-mod.o
|
2005-04-17 00:20:36 +02:00
|
|
|
obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o
|
2014-01-14 01:37:54 +01:00
|
|
|
obj-$(CONFIG_BLK_DEV_DM_BUILTIN) += dm-builtin.o
|
2011-10-31 21:19:09 +01:00
|
|
|
obj-$(CONFIG_DM_BUFIO) += dm-bufio.o
|
2012-10-12 22:02:13 +02:00
|
|
|
obj-$(CONFIG_DM_BIO_PRISON) += dm-bio-prison.o
|
2005-04-17 00:20:36 +02:00
|
|
|
obj-$(CONFIG_DM_CRYPT) += dm-crypt.o
|
2007-05-09 11:33:06 +02:00
|
|
|
obj-$(CONFIG_DM_DELAY) += dm-delay.o
|
2011-03-24 14:54:24 +01:00
|
|
|
obj-$(CONFIG_DM_FLAKEY) += dm-flakey.o
|
2005-04-17 00:20:36 +02:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o
|
2009-06-22 11:12:27 +02:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH_QL) += dm-queue-length.o
|
2009-06-22 11:12:28 +02:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH_ST) += dm-service-time.o
|
2013-07-11 00:41:19 +02:00
|
|
|
obj-$(CONFIG_DM_SWITCH) += dm-switch.o
|
2005-04-17 00:20:36 +02:00
|
|
|
obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o
|
2011-10-31 21:21:18 +01:00
|
|
|
obj-$(CONFIG_DM_PERSISTENT_DATA) += persistent-data/
|
2008-10-21 18:45:06 +02:00
|
|
|
obj-$(CONFIG_DM_MIRROR) += dm-mirror.o dm-log.o dm-region-hash.o
|
2009-06-22 11:12:35 +02:00
|
|
|
obj-$(CONFIG_DM_LOG_USERSPACE) += dm-log-userspace.o
|
2005-04-17 00:20:36 +02:00
|
|
|
obj-$(CONFIG_DM_ZERO) += dm-zero.o
|
dm: raid456 basic support
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>
2011-01-13 21:00:02 +01:00
|
|
|
obj-$(CONFIG_DM_RAID) += dm-raid.o
|
2011-10-31 21:21:18 +01:00
|
|
|
obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o
|
2012-03-28 19:43:38 +02:00
|
|
|
obj-$(CONFIG_DM_VERITY) += dm-verity.o
|
2013-03-01 23:45:51 +01:00
|
|
|
obj-$(CONFIG_DM_CACHE) += dm-cache.o
|
2013-03-01 23:45:51 +01:00
|
|
|
obj-$(CONFIG_DM_CACHE_MQ) += dm-cache-mq.o
|
2015-05-15 16:33:34 +02:00
|
|
|
obj-$(CONFIG_DM_CACHE_SMQ) += dm-cache-smq.o
|
2013-03-01 23:45:52 +01:00
|
|
|
obj-$(CONFIG_DM_CACHE_CLEANER) += dm-cache-cleaner.o
|
2014-03-03 16:23:15 +01:00
|
|
|
obj-$(CONFIG_DM_ERA) += dm-era.o
|
2015-03-20 15:50:37 +01:00
|
|
|
obj-$(CONFIG_DM_LOG_WRITES) += dm-log-writes.o
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2007-10-19 23:48:00 +02:00
|
|
|
ifeq ($(CONFIG_DM_UEVENT),y)
|
|
|
|
dm-mod-objs += dm-uevent.o
|
|
|
|
endif
|