summaryrefslogtreecommitdiffstats
path: root/md.4
diff options
context:
space:
mode:
Diffstat (limited to 'md.4')
-rw-r--r--md.483
1 files changed, 58 insertions, 25 deletions
diff --git a/md.4 b/md.4
index 4643dd2..80d0c51 100644
--- a/md.4
+++ b/md.4
@@ -16,7 +16,7 @@ Array of Independent Devices.
.B md
supports RAID levels 1 (mirroring) 4 (striped array with parity
device), 5 (striped array with distributed parity information) and 6
-(striped array with distributed dual redundancy information.) If a
+(striped array with distributed dual redundancy information.) If
some number of underlying devices fails while using one of these
levels, the array will continue to function; this number is one for
RAID levels 4 and 5, two for RAID level 6, and all but one (N-1) for
@@ -24,12 +24,13 @@ RAID level 1.
.PP
.B md
also supports a number of pseudo RAID (non-redundant) configurations
-including RAID0 (striped array), LINEAR (catenated array) and
-MULTIPATH (a set of different interfaces to the same device).
+including RAID0 (striped array), LINEAR (catenated array),
+MULTIPATH (a set of different interfaces to the same device),
+and FAULTY (a layer over a single device that sythesises errors).
.SS MD SUPER BLOCK
-With the exception of Legacy Arrays described below, each device that
-is incorporated into an MD array has a
+Though it is possible to create an array without using per-device
+superblocks (see below), each device in an MD array will normally have a
.I super block
written towards the end of the device. This superblock records
information about the structure and state of the array so that the
@@ -53,17 +54,21 @@ UUID
a 128 bit Universally Unique Identifier that identifies the array that
this device is part of.
-.SS LEGACY ARRAYS
-Early versions of the
-.B md
-driver only supported Linear and Raid0 configurations and so
-did not use an MD superblock (as there is no state that needs to be
-recorded). While it is strongly recommended that all newly created
-arrays utilise a superblock to help ensure that they are assembled
-properly, the
-.B md
-driver still supports legacy linear and raid0 md arrays that
-do not have a superblock.
+.SS NO-SUPERBLOCK ARRAYS
+
+It is possible for some md arrays to be created without a superblock.
+This allows the whole of each device to participate in the array, but
+requires some external mechanism to determine what devices should be
+arranged into which arrays.
+
+FAULTY arrays are an obvious candidate for not having a superblock as
+there is nothing useful to go in the superblock. MUTIPATH arrays can also be
+usefully made without superblocks as there are likely to be other ways
+to detect that two paths connect to the same real devices.
+
+Other array type can work without superblocks are RAID1, RAID0, and LINEAR.
+However these should only be made without a superblock if you are sure
+that you know what you are doing.
.SS LINEAR
@@ -73,7 +78,7 @@ drive together to form one large virtual drive.
One advantage of this arrangement over the more common RAID0
arrangement is that the array may be reconfigured at a later time with
an extra drive and so the array is made bigger without disturbing the
-data that is on the array. However this cannot be done on a live
+data that is on the array. However this cannot yet be done on a live
array.
@@ -160,10 +165,10 @@ in a MULTIPATH md array. However there are multiple access points
(paths) to this device, and one of these paths might fail, so there
are some similarities.
-A MULTIPATH array is composed of a number of logical different
+A MULTIPATH array is composed of a number of logically different
devices, often fibre channel interfaces, that all refer the the same
real device. If one of these interfaces fails (e.g. due to cable
-problems), the multipath driver to attempt to redirect requests to
+problems), the multipath driver will attempt to redirect requests to
another interface.
.SS FAULTY
@@ -173,7 +178,7 @@ superblock, so the md array created provides direct access to all of
the data in the component device.
The FAULTY module may be requested to simulate faults to allow testing
-of other md levels or of filesystem. Faults can be chosen to trigger
+of other md levels or of filesystems. Faults can be chosen to trigger
on read requests or write requests, and can be transient (a subsequent
read/write at the address will probably succeed) or persistant
(subsequent read/write of the same address will fail). Further, read
@@ -181,9 +186,9 @@ faults can be "fixable" meaning that they persist until a write
request at the same address.
Fault types can be requested with a period. In this case the fault
-will recur repeatedly after the given number of request of the
-relevant time. For example if persistent read faults have a period of
-100, then ever 100th read request would generate a fault, and the
+will recur repeatedly after the given number of requests of the
+relevant type. For example if persistent read faults have a period of
+100, then every 100th read request would generate a fault, and the
faulty sector would be recorded so that subsequent reads on that
sector would also fail.
@@ -191,7 +196,7 @@ There is a limit to the number of faulty sectors that are remembered.
Faults generated after this limit is exhausted are treated as
transient.
-It list of faulty sectors can be flushed, and the active list of
+The list of faulty sectors can be flushed, and the active list of
failure modes can be cleared.
.SS UNCLEAN SHUTDOWN
@@ -199,7 +204,7 @@ failure modes can be cleared.
When changes are made to a RAID1, RAID4, RAID5 or RAID6 array there is a
possibility of inconsistency for short periods of time as each update
requires are least two block to be written to different devices, and
-these writes probably wont happen at exactly the same time.
+these writes probably won't happen at exactly the same time.
Thus if a system with one of these arrays is shutdown in the middle of
a write operation (e.g. due to power failure), the array may not be
consistent.
@@ -215,6 +220,11 @@ the parity block has the correct data. This process, known as
"resynchronising" or "resync" is performed in the background. The
array can still be used, though possibly with reduced performance.
+In 2.6 Linux kernels, an md array is marked clean after a short period
+(around 20 milliseconds) of no write activity, and then marked dirty
+before any subsequent write is attempted. This means that unclean
+shutdowns are much less likely with a 2.6 kernel.
+
If a RAID4, RAID5 or RAID6 array is degraded (missing at least one
drive) when it is restarted after an unclean shutdown, it cannot
recalculate parity, and so it is possible that data might be
@@ -257,13 +267,36 @@ an MD array, and if any full arrays are found, they are started. This
kernel paramenter disables this behaviour.
.TP
+.B raid=partitionable
+.TP
+.B raid=part
+These are available in 2.6 and later kernels only. They indicate that
+autodetected MD arrays should be created as partitionable arrays, with
+a different major device number to the original non-partitionable md
+arrays. The device number is listed as
+.I mdp
+in
+.IR /proc/devices .
+
+
+.TP
.BI md= n , dev , dev ,...
+.TP
+.BI md=d n , dev , dev ,...
This tells the md driver to assemble
.B /dev/md n
from the listed devices. It is only necessary to start the device
holding the root filesystem this way. Other arrays are best started
once the system is booted.
+In 2.6 kernels, the
+.B d
+immediately after the
+.B =
+indicates that a partitionable device (e.g.
+.BR /dev/md/d0 )
+should be created rather than the original non-partitionable device.
+
.TP
.BI md= n , l , c , i , dev...
This tells the md driver to assemble a legacy RAID0 or LINEAR array