From: "Scott Weikart" <Scott.W@Benetech.org>
Thanks Scott!
''' See file COPYING in distribution for details.
.TH MD 4
.SH NAME
''' See file COPYING in distribution for details.
.TH MD 4
.SH NAME
-md \- Multiple Device driver aka Linux Software Raid
+md \- Multiple Device driver aka Linux Software RAID
.SH SYNOPSIS
.BI /dev/md n
.br
.SH SYNOPSIS
.BI /dev/md n
.br
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
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
-RAID level 1, and dependant on configuration for level 10.
+RAID level 1, and dependent on configuration for level 10.
.PP
.B md
also supports a number of pseudo RAID (non-redundant) configurations
.PP
.B md
also supports a number of pseudo RAID (non-redundant) configurations
The available size of each device is the amount of space before the
super block, so between 64K and 128K is lost when a device in
incorporated into an MD array.
The available size of each device is the amount of space before the
super block, so between 64K and 128K is lost when a device in
incorporated into an MD array.
-This superblock stores multi-byte fields in a processor-dependant
+This superblock stores multi-byte fields in a processor-dependent
manner, so arrays cannot easily be moved between computers with
different processors.
manner, so arrays cannot easily be moved between computers with
different processors.
variations can be stored at the start of the device (version 1.1) or 4K from
the start of the device (version 1.2).
This superblock format stores multibyte data in a
variations can be stored at the start of the device (version 1.1) or 4K from
the start of the device (version 1.2).
This superblock format stores multibyte data in a
-processor-independent format and has supports up to hundreds of
+processor-independent format and supports up to hundreds of
component devices (version 0.90 only supports 28).
The superblock contains, among other things:
component devices (version 0.90 only supports 28).
The superblock contains, among other things:
.TP
UUID
a 128 bit Universally Unique Identifier that identifies the array that
.TP
UUID
a 128 bit Universally Unique Identifier that identifies the array that
When a version 0.90 array is being reshaped (e.g. adding extra devices
to a RAID5), the version number is temporarily set to 0.91. This
When a version 0.90 array is being reshaped (e.g. adding extra devices
to a RAID5), the version number is temporarily set to 0.91. This
.SS ARRAYS WITHOUT SUPERBLOCKS
While it is usually best to create arrays with superblocks so that
.SS ARRAYS WITHOUT SUPERBLOCKS
While it is usually best to create arrays with superblocks so that
-they can be assembled reliably, there are some circumstances where an
-array without superblocks in preferred. This include:
+they can be assembled reliably, there are some circumstances when an
+array without superblocks is preferred. These include:
.TP
LEGACY ARRAYS
Early versions of the
.TP
LEGACY ARRAYS
Early versions of the
.TP
RAID1
In some configurations it might be desired to create a raid1
.TP
RAID1
In some configurations it might be desired to create a raid1
-configuration that does use a superblock, and to maintain the state of
+configuration that does not use a superblock, and to maintain the state of
the array elsewhere. While not encouraged for general us, it does
have special-purpose uses and is supported.
.SS LINEAR
A linear array simply catenates the available space on each
the array elsewhere. While not encouraged for general us, it does
have special-purpose uses and is supported.
.SS LINEAR
A linear array simply catenates the available space on each
-drive together to form one large virtual drive.
+drive 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
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
+an extra drive, so the array is made bigger without disturbing the
+data that is on the array. This can even be done on a live
array.
If a chunksize is given with a LINEAR array, the usable space on each
array.
If a chunksize is given with a LINEAR array, the usable space on each
drives have been assigned one chunk. This collection of chunks forms
a
.BR stripe .
drives have been assigned one chunk. This collection of chunks forms
a
.BR stripe .
-Further chunks are gathered into stripes in the same way which are
+Further chunks are gathered into stripes in the same way, and are
assigned to the remaining space in the drives.
If devices in the array are not all the same size, then once the
assigned to the remaining space in the drives.
If devices in the array are not all the same size, then once the
All devices in a RAID1 array should be the same size. If they are
not, then only the amount of space available on the smallest device is
All devices in a RAID1 array should be the same size. If they are
not, then only the amount of space available on the smallest device is
-used. Any extra space on other devices is wasted.
+used (any extra space on other devices is wasted).
drives, so extra space on devices that are larger than the smallest is
wasted.
drives, so extra space on devices that are larger than the smallest is
wasted.
-When any block in a RAID4 array is modified the parity block for that
+When any block in a RAID4 array is modified, the parity block for that
stripe (i.e. the block in the parity device at the same device offset
as the stripe) is also modified so that the parity block always
stripe (i.e. the block in the parity device at the same device offset
as the stripe) is also modified so that the parity block always
-contains the "parity" for the whole stripe. i.e. its contents is
+contains the "parity" for the whole stripe. I.e. its content is
equivalent to the result of performing an exclusive-or operation
between all the data blocks in the stripe.
equivalent to the result of performing an exclusive-or operation
between all the data blocks in the stripe.
RAID5 is very similar to RAID4. The difference is that the parity
blocks for each stripe, instead of being on a single device, are
distributed across all devices. This allows more parallelism when
RAID5 is very similar to RAID4. The difference is that the parity
blocks for each stripe, instead of being on a single device, are
distributed across all devices. This allows more parallelism when
-writing as two different block updates will quite possibly affect
+writing, as two different block updates will quite possibly affect
parity blocks on different devices so there is less contention.
parity blocks on different devices so there is less contention.
-This also allows more parallelism when reading as read requests are
+This also allows more parallelism when reading, as read requests are
distributed over all the devices in the array instead of all but one.
.SS RAID6
distributed over all the devices in the array instead of all but one.
.SS RAID6
-RAID10 provides a combination of RAID1 and RAID0, and sometimes known
+RAID10 provides a combination of RAID1 and RAID0, and is sometimes known
as RAID1+0. Every datablock is duplicated some number of times, and
the resulting collection of datablocks are distributed over multiple
drives.
as RAID1+0. Every datablock is duplicated some number of times, and
the resulting collection of datablocks are distributed over multiple
drives.
-When configuring a RAID10 array it is necessary to specify the number
+When configuring a RAID10 array, it is necessary to specify the number
of replicas of each data block that are required (this will normally
be 2) and whether the replicas should be 'near', 'offset' or 'far'.
(Note that the 'offset' layout is only available from 2.6.18).
of replicas of each data block that are required (this will normally
be 2) and whether the replicas should be 'near', 'offset' or 'far'.
(Note that the 'offset' layout is only available from 2.6.18).
writes.
It should be noted that the number of devices in a RAID10 array need
writes.
It should be noted that the number of devices in a RAID10 array need
-not be a multiple of the number of replica of each data block, those
+not be a multiple of the number of replica of each data block; however,
there must be at least as many devices as replicas.
If, for example, an array is created with 5 devices and 2 replicas,
there must be at least as many devices as replicas.
If, for example, an array is created with 5 devices and 2 replicas,
every block will be stored on two different devices.
Finally, it is possible to have an array with both 'near' and 'far'
every block will be stored on two different devices.
Finally, it is possible to have an array with both 'near' and 'far'
-copies. If and array is configured with 2 near copies and 2 far
+copies. If an array is configured with 2 near copies and 2 far
copies, then there will be a total of 4 copies of each block, each on
a different drive. This is an artifact of the implementation and is
unlikely to be of real value.
copies, then there will be a total of 4 copies of each block, each on
a different drive. This is an artifact of the implementation and is
unlikely to be of real value.
faults can be "fixable" meaning that they persist until a write
request at the same address.
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
+Fault types can be requested with a period. In this case, the fault
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
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
When changes are made to a RAID1, RAID4, RAID5, RAID6, or RAID10 array
there is a possibility of inconsistency for short periods of time as
When changes are made to a RAID1, RAID4, RAID5, RAID6, or RAID10 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
+each update requires at least two block to be written to different
+devices, and 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.
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.
The array can still be used, though possibly with reduced performance.
If a RAID4, RAID5 or RAID6 array is degraded (missing at least one
The array can still be used, though possibly with reduced performance.
If a RAID4, RAID5 or RAID6 array is degraded (missing at least one
-drive) when it is restarted after an unclean shutdown, it cannot
+drive, two for RAID6) when it is restarted after an unclean shutdown, it cannot
recalculate parity, and so it is possible that data might be
undetectably corrupted. The 2.4 md driver
.B does not
recalculate parity, and so it is possible that data might be
undetectably corrupted. The 2.4 md driver
.B does not
If the md driver detects a write error on a device in a RAID1, RAID4,
RAID5, RAID6, or RAID10 array, it immediately disables that device
(marking it as faulty) and continues operation on the remaining
If the md driver detects a write error on a device in a RAID1, RAID4,
RAID5, RAID6, or RAID10 array, it immediately disables that device
(marking it as faulty) and continues operation on the remaining
-devices. If there is a spare drive, the driver will start recreating
-on one of the spare drives the data what was on that failed drive,
+devices. If there are spare drives, the driver will start recreating
+on one of the spare drives the data which was on that failed drive,
either by copying a working drive in a RAID1 configuration, or by
doing calculations with the parity block on RAID4, RAID5 or RAID6, or
either by copying a working drive in a RAID1 configuration, or by
doing calculations with the parity block on RAID4, RAID5 or RAID6, or
-by finding a copying originals for RAID10.
+by finding and copying originals for RAID10.
In kernels prior to about 2.6.15, a read error would cause the same
effect as a write error. In later kernels, a read-error will instead
In kernels prior to about 2.6.15, a read error would cause the same
effect as a write error. In later kernels, a read-error will instead
will find the correct data from elsewhere, write it over the block
that failed, and then try to read it back again. If either the write
or the re-read fail, md will treat the error the same way that a write
will find the correct data from elsewhere, write it over the block
that failed, and then try to read it back again. If either the write
or the re-read fail, md will treat the error the same way that a write
-error is treated and will fail the whole device.
+error is treated, and will fail the whole device.
While this recovery process is happening, the md driver will monitor
accesses to the array and will slow down the rate of recovery if other
While this recovery process is happening, the md driver will monitor
accesses to the array and will slow down the rate of recovery if other
The intent log can be stored in a file on a separate device, or it can
be stored near the superblocks of an array which has superblocks.
The intent log can be stored in a file on a separate device, or it can
be stored near the superblocks of an array which has superblocks.
-It is possible to add an intent log or an active array, or remove an
+It is possible to add an intent log to an active array, or remove an
intent log if one is present.
In 2.6.13, intent bitmaps are only supported with RAID1. Other levels
intent log if one is present.
In 2.6.13, intent bitmaps are only supported with RAID1. Other levels
.IR Reshaping ,
is the processes of re-arranging the data stored in each stripe into a
new layout. This might involve changing the number of devices in the
.IR Reshaping ,
is the processes of re-arranging the data stored in each stripe into a
new layout. This might involve changing the number of devices in the
-array (so the stripes are wider) changing the chunk size (so stripes
+array (so the stripes are wider), changing the chunk size (so stripes
are deeper or shallower), or changing the arrangement of data and
are deeper or shallower), or changing the arrangement of data and
-parity, possibly changing the raid level (e.g. 1 to 5 or 5 to 6).
+parity (possibly changing the raid level, e.g. 1 to 5 or 5 to 6).
As of Linux 2.6.17, md can reshape a raid5 array to have more
devices. Other possibilities may follow in future kernels.
As of Linux 2.6.17, md can reshape a raid5 array to have more
devices. Other possibilities may follow in future kernels.
.B sysfs
interface),
.IP \(bu 4
.B sysfs
interface),
.IP \(bu 4
-Take a copy of the data somewhere (i.e. make a backup)
+take a copy of the data somewhere (i.e. make a backup),
-Allow the process to continue and invalidate the backup and restore
+allow the process to continue and invalidate the backup and restore
write access once the critical section is passed, and
.IP \(bu 4
write access once the critical section is passed, and
.IP \(bu 4
-Provide for restoring the critical data before restarting the array
+provide for restoring the critical data before restarting the array
after a system crash.
.PP
.B mdadm
after a system crash.
.PP
.B mdadm
-version 2.4 and later will do this for growing a RAID5 array.
+versions from 2.4 do this for growing a RAID5 array.
For operations that do not change the size of the array, like simply
increasing chunk size, or converting RAID5 to RAID6 with one extra
For operations that do not change the size of the array, like simply
increasing chunk size, or converting RAID5 to RAID6 with one extra
-device, the entire process is the critical section. In this case the
-restripe will need to progress in stages as a section is suspended,
+device, the entire process is the critical section. In this case, the
+restripe will need to progress in stages, as a section is suspended,
-restriped, and released. This is not yet implemented.
+restriped, and released; this is not yet implemented.
-All block devices appear as a directory in
+Each block device appears as a directory in
+(which is usually mounted at
.BR /sys ).
For MD devices, this directory will contain a subdirectory called
.B md
.BR /sys ).
For MD devices, this directory will contain a subdirectory called
.B md
.B /proc/sys/dev/raid/speed_limit_min
for this array only.
Writing the value
.B /proc/sys/dev/raid/speed_limit_min
for this array only.
Writing the value
-.B system
-to this file cause the system-wide setting to have effect.
+.B "system"
+to this file will cause the system-wide setting to have effect.
As mentioned above, md will not normally start a RAID4, RAID5, or
RAID6 that is both dirty and degraded as this situation can imply
hidden data loss. This can be awkward if the root filesystem is
As mentioned above, md will not normally start a RAID4, RAID5, or
RAID6 that is both dirty and degraded as this situation can imply
hidden data loss. This can be awkward if the root filesystem is
-affected. Using the module parameter allows such arrays to be started
+affected. Using this module parameter allows such arrays to be started
at boot time. It should be understood that there is a real (though
small) risk of data corruption in this situation.
at boot time. It should be understood that there is a real (though
small) risk of data corruption in this situation.
Contains information about the status of currently running array.
.TP
.B /proc/sys/dev/raid/speed_limit_min
Contains information about the status of currently running array.
.TP
.B /proc/sys/dev/raid/speed_limit_min
-A readable and writable file that reflects the current goal rebuild
+A readable and writable file that reflects the current "goal" rebuild
speed for times when non-rebuild activity is current on an array.
The speed is in Kibibytes per second, and is a per-device rate, not a
speed for times when non-rebuild activity is current on an array.
The speed is in Kibibytes per second, and is a per-device rate, not a
-per-array rate (which means that an array with more disc will shuffle
+per-array rate (which means that an array with more disks will shuffle
more data for a given speed). The default is 100.
.TP
.B /proc/sys/dev/raid/speed_limit_max
more data for a given speed). The default is 100.
.TP
.B /proc/sys/dev/raid/speed_limit_max
-A readable and writable file that reflects the current goal rebuild
+A readable and writable file that reflects the current "goal" rebuild
speed for times when no non-rebuild activity is current on an array.
The default is 100,000.
speed for times when no non-rebuild activity is current on an array.
The default is 100,000.
.SH NAME
mdadm \- manage MD devices
.I aka
.SH NAME
mdadm \- manage MD devices
.I aka
.B MULTIPATH
is not a Software RAID mechanism, but does involve
.B MULTIPATH
is not a Software RAID mechanism, but does involve
-multiple devices. For
-.B MULTIPATH
each device is a path to one common physical storage device.
.B FAULTY
each device is a path to one common physical storage device.
.B FAULTY
mdadm has several major modes of operation:
.TP
.B Assemble
mdadm has several major modes of operation:
.TP
.B Assemble
-Assemble the parts of a previously created
+Assemble the components of a previously created
array into an active array. Components can be explicitly given
or can be searched for.
.B mdadm
array into an active array. Components can be explicitly given
or can be searched for.
.B mdadm
.I mdadm
cannot differentiate between initial creation and subsequent assembly
of an array. It also cannot perform any checks that appropriate
.I mdadm
cannot differentiate between initial creation and subsequent assembly
of an array. It also cannot perform any checks that appropriate
-devices have been requested. Because of this, the
+components have been requested. Because of this, the
.B Build
mode should only be used together with a complete understanding of
what you are doing.
.B Build
mode should only be used together with a complete understanding of
what you are doing.
.TP
.B "Follow or Monitor"
Monitor one or more md devices and act on any state changes. This is
.TP
.B "Follow or Monitor"
Monitor one or more md devices and act on any state changes. This is
-only meaningful for raid1, 4, 5, 6, 10 or multipath arrays as
+only meaningful for raid1, 4, 5, 6, 10 or multipath arrays, as
only these have interesting state. raid0 or linear never have
missing, spare, or failed drives, so there is nothing to monitor.
only these have interesting state. raid0 or linear never have
missing, spare, or failed drives, so there is nothing to monitor.
.B "Grow"
Grow (or shrink) an array, or otherwise reshape it in some way.
Currently supported growth options including changing the active size
.B "Grow"
Grow (or shrink) an array, or otherwise reshape it in some way.
Currently supported growth options including changing the active size
-of component devices in RAID level 1/4/5/6 and changing the number of
-active devices in RAID1/5/6.
+of component devices and changing the number of active devices in RAID
+levels 1/4/5/6, as well as adding or removing a write-intent bitmap.
.TP
.B "Incremental Assembly"
.TP
.B "Incremental Assembly"
.TP
.BR \-h ", " \-\-help
Display general help message or, after one of the above options, a
.TP
.BR \-h ", " \-\-help
Display general help message or, after one of the above options, a
-mode specific help message.
+mode-specific help message.
.TP
.BR \-f ", " \-\-force
.TP
.BR \-f ", " \-\-force
-Be more forceful about certain operations. See the various modes of
+Be more forceful about certain operations. See the various modes for
the exact meaning of this option in different contexts.
.TP
.BR \-c ", " \-\-config=
Specify the config file. Default is to use
.BR /etc/mdadm.conf ,
the exact meaning of this option in different contexts.
.TP
.BR \-c ", " \-\-config=
Specify the config file. Default is to use
.BR /etc/mdadm.conf ,
-or if that is missing, then
+or if that is missing then
.BR /etc/mdadm/mdadm.conf .
If the config file given is
.BR /etc/mdadm/mdadm.conf .
If the config file given is
then nothing will be read, but
.I mdadm
will act as though the config file contained exactly
then nothing will be read, but
.I mdadm
will act as though the config file contained exactly
.B /proc/partitions
to find a list of devices to scan.
If the word
.B /proc/partitions
to find a list of devices to scan.
If the word
is given for the config file, then
.I mdadm
will act as though the config file were empty.
.TP
.BR \-s ", " \-\-scan
is given for the config file, then
.I mdadm
will act as though the config file were empty.
.TP
.BR \-s ", " \-\-scan
.B /proc/mdstat
for missing information.
In general, this option gives
.B mdadm
.B /proc/mdstat
for missing information.
In general, this option gives
.B mdadm
-permission to get any missing information, like component devices,
-array devices, array identities, and alert destination from the
-configuration file:
-.BR /etc/mdadm.conf .
-One exception is MISC mode when using
+permission to get any missing information (like component devices,
+array devices, array identities, and alert destination) from the
+configuration file (see previous option);
+one exception is MISC mode when using
in which case
.B \-\-scan
says to get a list of array devices from
in which case
.B \-\-scan
says to get a list of array devices from
.RS
.IP "0, 0.90, default"
Use the original 0.90 format superblock. This format limits arrays to
.RS
.IP "0, 0.90, default"
Use the original 0.90 format superblock. This format limits arrays to
-28 componenet devices and limits component devices of levels 1 and
+28 component devices and limits component devices of levels 1 and
greater to 2 terabytes.
.IP "1, 1.0, 1.1, 1.2"
Use the new version-1 format superblock. This has few restrictions.
greater to 2 terabytes.
.IP "1, 1.0, 1.1, 1.2"
Use the new version-1 format superblock. This has few restrictions.
-The different subversion store the superblock at different locations
+The different sub-versions store the superblock at different locations
on the device, either at the end (for 1.0), at the start (for 1.1) or
4K from the start (for 1.2).
.RE
on the device, either at the end (for 1.0), at the start (for 1.1) or
4K from the start (for 1.2).
.RE
.B \-\-homehost=
This will override any
.B HOMEHOST
.B \-\-homehost=
This will override any
.B HOMEHOST
-setting in the config file and provides the identify of the host which
+setting in the config file and provides the identity of the host which
should be considered the home for any arrays.
When creating an array, the
.B homehost
will be recorded in the superblock. For version-1 superblocks, it will
should be considered the home for any arrays.
When creating an array, the
.B homehost
will be recorded in the superblock. For version-1 superblocks, it will
-be prefixed to the array name. For version-0.90 superblocks part of
+be prefixed to the array name. For version-0.90 superblocks, part of
the SHA1 hash of the hostname will be stored in the later half of the
UUID.
the SHA1 hash of the hostname will be stored in the later half of the
UUID.
.TP
.BR \-z ", " \-\-size=
.TP
.BR \-z ", " \-\-size=
-Amount (in Kibibytes) of space to use from each drive in RAID1/4/5/6.
+Amount (in Kibibytes) of space to use from each drive in RAID level 1/4/5/6.
This must be a multiple of the chunk size, and must leave about 128Kb
of space at the end of the drive for the RAID superblock.
If this is not specified
This must be a multiple of the chunk size, and must leave about 128Kb
of space at the end of the drive for the RAID superblock.
If this is not specified
The default is
.BR left\-symmetric .
The default is
.BR left\-symmetric .
-When setting the failure mode for
-.I faulty
+When setting the failure mode for level
+.I faulty,
the options are:
.BR write\-transient ", " wt ,
.BR read\-transient ", " rt ,
the options are:
.BR write\-transient ", " wt ,
.BR read\-transient ", " rt ,
.BR read\-fixable ", " rf ,
.BR clear ", " flush ", " none .
.BR read\-fixable ", " rf ,
.BR clear ", " flush ", " none .
-Each mode can be followed by a number which is used as a period
+Each failure mode can be followed by a number, which is used as a period
between fault generation. Without a number, the fault is generated
once on the first relevant request. With a number, the fault will be
between fault generation. Without a number, the fault is generated
once on the first relevant request. With a number, the fault will be
-generated after that many request, and will continue to be generated
+generated after that many requests, and will continue to be generated
every time the period elapses.
Multiple failure modes can be current simultaneously by using the
every time the period elapses.
Multiple failure modes can be current simultaneously by using the
must be specified before the fault mode is specified.
Finally, the layout options for RAID10 are one of 'n', 'o' or 'f' followed
must be specified before the fault mode is specified.
Finally, the layout options for RAID10 are one of 'n', 'o' or 'f' followed
-by a small number. The default is 'n2'.
+by a small number. The default is 'n2'. The supported options are:
signals 'near' copies. Multiple copies of one data block are at
similar offsets in different devices.
signals 'near' copies. Multiple copies of one data block are at
similar offsets in different devices.
signals 'offset' copies. Rather than the chunks being duplicated
within a stripe, whole stripes are duplicated but are rotated by one
device so duplicate blocks are on different devices. Thus subsequent
copies of a block are in the next drive, and are one chunk further
down.
signals 'offset' copies. Rather than the chunks being duplicated
within a stripe, whole stripes are duplicated but are rotated by one
device so duplicate blocks are on different devices. Thus subsequent
copies of a block are in the next drive, and are one chunk further
down.
-(multiple copies have very different offsets). See md(4) for more
-detail about 'near' and 'far'.
+(multiple copies have very different offsets).
+See md(4) for more detail about 'near' and 'far'.
The number is the number of copies of each datablock. 2 is normal, 3
can be useful. This number can be at most equal to the number of
The number is the number of copies of each datablock. 2 is normal, 3
can be useful. This number can be at most equal to the number of
.B \-\-force
is also given. The same file should be provided
when assembling the array. If the word
.B \-\-force
is also given. The same file should be provided
when assembling the array. If the word
is given, then the bitmap is stored with the metadata on the array,
and so is replicated on all devices. If the word
is given, then the bitmap is stored with the metadata on the array,
and so is replicated on all devices. If the word
is given with
.B \-\-grow
mode, then any bitmap that is present is removed.
is given with
.B \-\-grow
mode, then any bitmap that is present is removed.
Set the chunksize of the bitmap. Each bit corresponds to that many
Kilobytes of storage.
When using a file based bitmap, the default is to use the smallest
Set the chunksize of the bitmap. Each bit corresponds to that many
Kilobytes of storage.
When using a file based bitmap, the default is to use the smallest
-size that is atleast 4 and requires no more than 2^21 chunks.
+size that is at-least 4 and requires no more than 2^21 chunks.
When using an
.B internal
bitmap, the chunksize is automatically determined to make best use of
When using an
.B internal
bitmap, the chunksize is automatically determined to make best use of
data will be affected unless you actually write to the array. It can
also be used when creating a RAID1 or RAID10 if you want to avoid the
initial resync, however this practice \(em while normally safe \(em is not
data will be affected unless you actually write to the array. It can
also be used when creating a RAID1 or RAID10 if you want to avoid the
initial resync, however this practice \(em while normally safe \(em is not
-recommended. Use this ony if you really know what you are doing.
+recommended. Use this only if you really know what you are doing.
.TP
.BR \-\-backup\-file=
.TP
.BR \-\-backup\-file=
.BR \-N ", " \-\-name=
Specify the name of the array to assemble. This must be the name
that was specified when creating the array. It must either match
.BR \-N ", " \-\-name=
Specify the name of the array to assemble. This must be the name
that was specified when creating the array. It must either match
-then name stored in the superblock exactly, or it must match
+the name stored in the superblock exactly, or it must match
with the current
.I homehost
with the current
.I homehost
-is added to the start of the given name.
+prefixed to the start of the given name.
.TP
.BR \-f ", " \-\-force
.TP
.BR \-f ", " \-\-force
.B \-\-no\-degraded
This is the reverse of
.B \-\-run
.B \-\-no\-degraded
This is the reverse of
.B \-\-run
-in that it inhibits the started if array unless all expected drives
+in that it inhibits the startup of array unless all expected drives
are present. This is only needed with
are present. This is only needed with
-.B \-\-scan
-and can be used if you physical connections to devices are
+.B \-\-scan,
+and can be used if the physical connections to devices are
not as reliable as you would like.
.TP
not as reliable as you would like.
.TP
.TP
.B \-\-auto\-update\-homehost
.TP
.B \-\-auto\-update\-homehost
-This flag is only meaning with auto-assembly (see discussion below).
+This flag is only meaningful with auto-assembly (see discussion below).
In that situation, if no suitable arrays are found for this homehost,
.I mdadm
In that situation, if no suitable arrays are found for this homehost,
.I mdadm
-will recan for any arrays at all and will assemble them and update the
+will rescan for any arrays at all and will assemble them and update the
homehost to match the current host.
.SH For Manage mode:
homehost to match the current host.
.SH For Manage mode:
can be given to
.BR \-\-remove .
The first causes all failed device to be removed. The second causes
can be given to
.BR \-\-remove .
The first causes all failed device to be removed. The second causes
-any device which is no longer connected to the system (i.e and open
+any device which is no longer connected to the system (i.e an 'open'
returns
.BR ENXIO )
to be removed. This will only succeed for devices that are spares or
returns
.BR ENXIO )
to be removed. This will only succeed for devices that are spares or
-Each of these options require that the first device list is the array
-to be acted upon and the remainder are component devices to be added,
-removed, or marked as fault. Several different operations can be
+Each of these options require that the first device listed is the array
+to be acted upon, and the remainder are component devices to be added,
+removed, or marked as faulty. Several different operations can be
specified for different devices, e.g.
.in +5
mdadm /dev/md0 \-\-add /dev/sda1 \-\-fail /dev/sdb1 \-\-remove /dev/sdb1
.in -5
Each operation applies to all devices listed until the next
specified for different devices, e.g.
.in +5
mdadm /dev/md0 \-\-add /dev/sda1 \-\-fail /dev/sdb1 \-\-remove /dev/sdb1
.in -5
Each operation applies to all devices listed until the next
If an array is using a write-intent bitmap, then devices which have
been removed can be re-added in a way that avoids a full
If an array is using a write-intent bitmap, then devices which have
been removed can be re-added in a way that avoids a full
-reconstruction but instead just updated the blocks that have changed
+reconstruction but instead just updates the blocks that have changed
since the device was removed. For arrays with persistent metadata
(superblocks) this is done automatically. For arrays created with
.B \-\-build
since the device was removed. For arrays with persistent metadata
(superblocks) this is done automatically. For arrays created with
.B \-\-build
.BR \-\-re\-add .
Devices can only be removed from an array if they are not in active
.BR \-\-re\-add .
Devices can only be removed from an array if they are not in active
-use. i.e. that must be spares or failed devices. To remove an active
-device, it must be marked as
-.B faulty
-first.
+use, i.e. that must be spares or failed devices. To remove an active
+device, it must first be marked as
+.B faulty.
.I mdadm
acts as though
.B \-\-scan
.I mdadm
acts as though
.B \-\-scan
-was given and identify information is extracted from the configuration file.
+was given and identity information is extracted from the configuration file.
The identity can be given with the
.B \-\-uuid
option, with the
.B \-\-super\-minor
The identity can be given with the
.B \-\-uuid
option, with the
.B \-\-super\-minor
-option, can be found in the config file, or will be taken from the
-super block on the first component-device listed on the command line.
+option, will be taken from the md-device record in the config file, or
+will be taken from the super block of the first component-device
+listed on the command line.
Devices can be given on the
.B \-\-assemble
Devices can be given on the
.B \-\-assemble
.B \-\-auto
option must be given to clarify how and whether the device should be
created.
.B \-\-auto
option must be given to clarify how and whether the device should be
created.
This can be useful for handling partitioned devices (which don't have
a stable device number \(em it can change after a reboot) and when using
"udev" to manage your
This can be useful for handling partitioned devices (which don't have
a stable device number \(em it can change after a reboot) and when using
"udev" to manage your
If the option to "auto" is "mdp" or "part" or (on the command line
only) "p", then mdadm will create a partitionable array, using the
If the option to "auto" is "mdp" or "part" or (on the command line
only) "p", then mdadm will create a partitionable array, using the
-first free one that is not in use, and does not already have an entry
+first free one that is not in use and does not already have an entry
in /dev (apart from numeric /dev/md* entries).
If the option to "auto" is "yes" or "md" or (on the command line)
in /dev (apart from numeric /dev/md* entries).
If the option to "auto" is "yes" or "md" or (on the command line)
device entries with meaningful names such as "/dev/md/home" or
"/dev/md/root", rather than names based on the numerical array number.
device entries with meaningful names such as "/dev/md/home" or
"/dev/md/root", rather than names based on the numerical array number.
-When using this option to create a partitionable array, the device
+When using option "auto" to create a partitionable array, the device
files for the first 4 partitions are also created. If a different
number is required it can be simply appended to the auto option.
e.g. "auto=part8". Partition names are created by appending a digit
files for the first 4 partitions are also created. If a different
number is required it can be simply appended to the auto option.
e.g. "auto=part8". Partition names are created by appending a digit
homehost. This is the only situation where
.I mdadm
will assemble arrays without being given specific device name or
homehost. This is the only situation where
.I mdadm
will assemble arrays without being given specific device name or
-identify information for the array.
+identity information for the array.
If the array uses version-1 metadata, then the
.B name
from the superblock is used to similarly create a name in
If the array uses version-1 metadata, then the
.B name
from the superblock is used to similarly create a name in
-.BR /dev/md .
-The name will have any 'host' prefix stripped first.
+.BR /dev/md
+(the name will have any 'host' prefix stripped first).
.HP 12
Usage:
.B mdadm \-\-build
.HP 12
Usage:
.B mdadm \-\-build
.BI \-\-chunk= X
.BI \-\-level= Y
.BI \-\-raid\-devices= Z
.BI \-\-chunk= X
.BI \-\-level= Y
.BI \-\-raid\-devices= Z
.HP 12
Usage:
.B mdadm \-\-create
.HP 12
Usage:
.B mdadm \-\-create
.BI \-\-chunk= X
.BI \-\-level= Y
.br
.BI \-\-chunk= X
.BI \-\-level= Y
.br
.I mdadm
will normally be 0 unless
.I mdadm
.I mdadm
will normally be 0 unless
.I mdadm
-failed to get useful information about the device(s). However if the
+failed to get useful information about the device(s); however, if the
.B \-\-test
option is given, then the exit status will be:
.RS
.B \-\-test
option is given, then the exit status will be:
.RS
will read the md superblock of the device and display the contents.
If
.B \-\-brief
will read the md superblock of the device and display the contents.
If
.B \-\-brief
-then multiple devices that are components of the one array
+is given, then multiple devices that are components of the one array
are grouped together and reported in a single entry suitable
for inclusion in
.BR /etc/mdadm.conf .
are grouped together and reported in a single entry suitable
for inclusion in
.BR /etc/mdadm.conf .
These events are passed to a separate program (if specified) and may
be mailed to a given E-mail address.
These events are passed to a separate program (if specified) and may
be mailed to a given E-mail address.
-When passing event to program, the program is run once for each event
-and is given 2 or 3 command-line arguments. The first is the
-name of the event (see below). The second is the name of the
+When passing events to a program, the program is run once for each event,
+and is given 2 or 3 command-line arguments: the first is the
+name of the event (see below), the second is the name of the
md device which is affected, and the third is the name of a related
md device which is affected, and the third is the name of a related
-device if relevant, such as a component device that has failed.
+device if relevant (such as a component device that has failed).
.B mdadm
will not monitor anything.
Without
.B mdadm
will not monitor anything.
Without
.B mdadm
will continue monitoring as long as something was found to monitor. If
no program or email is given, then each event is reported to
.B mdadm
will continue monitoring as long as something was found to monitor. If
no program or email is given, then each event is reported to
.TP
.B FailSpare
A spare component device which was being rebuilt to replace a faulty
.TP
.B FailSpare
A spare component device which was being rebuilt to replace a faulty
-device has failed. (syslog priority: Critial)
+device has failed. (syslog priority: Critical)
notices a drive failure which causes degradation, but only when
.I mdadm
notices that an array is degraded when it first sees the array.
notices a drive failure which causes degradation, but only when
.I mdadm
notices that an array is degraded when it first sees the array.
-(syslog priority: Critial)
+(syslog priority: Critical)
has been told, via the config file, that an array should have a certain
number of spare devices, and
.I mdadm
has been told, via the config file, that an array should have a certain
number of spare devices, and
.I mdadm
-detects that it has fewer that this number when it first sees the
+detects that it has fewer than this number when it first sees the
array, it will report a
.B SparesMissing
message.
array, it will report a
.B SparesMissing
message.
-.B Fail ,
-.B FailSpare ,
-.B DegradedArray ,
-.B SparesMissing ,
+.B Fail,
+.B FailSpare,
+.B DegradedArray,
+.B SparesMissing
and
.B TestMessage
cause Email to be sent. All events cause the program to be run.
and
.B TestMessage
cause Email to be sent. All events cause the program to be run.
-The program is run with two or three arguments, they being the event
+The program is run with two or three arguments: the event
name, the array device and possibly a second device.
Each event has an associated array device (e.g.
name, the array device and possibly a second device.
Each event has an associated array device (e.g.
For
.B mdadm
to move spares from one array to another, the different arrays need to
For
.B mdadm
to move spares from one array to another, the different arrays need to
-be labelled with the same
+be labeled with the same
.B spare-group
in the configuration file. The
.B spare-group
.B spare-group
in the configuration file. The
.B spare-group
-name can be any string. It is only necessary that different spare
+name can be any string; it is only necessary that different spare
groups use different names.
When
.B mdadm
groups use different names.
When
.B mdadm
-detects that an array which is in a spare group has fewer active
+detects that an array in a spare group has fewer active
devices than necessary for the complete array, and has no spare
devices, it will look for another array in the same spare group that
has a full complement of working drive and a spare. It will then
devices than necessary for the complete array, and has no spare
devices, it will look for another array in the same spare group that
has a full complement of working drive and a spare. It will then
.IP \(bu 4
increase the "raid-disks" attribute of RAID1, RAID5, and RAID6.
.IP \(bu 4
.IP \(bu 4
increase the "raid-disks" attribute of RAID1, RAID5, and RAID6.
.IP \(bu 4
-add a write-intent bitmap to any array which support these bitmaps, or
+add a write-intent bitmap to any array which supports these bitmaps, or
remove a write-intent bitmap from such an array.
.PP
remove a write-intent bitmap from such an array.
.PP
When reducing the number of devices in a RAID1 array, the slots which
are to be removed from the array must already be vacant. That is, the
When reducing the number of devices in a RAID1 array, the slots which
are to be removed from the array must already be vacant. That is, the
-devices that which were in those slots must be failed and removed.
+devices which were in those slots must be failed and removed.
When the number of devices is increased, any hot spares that are
present will be activated immediately.
When the number of devices is increased, any hot spares that are
present will be activated immediately.
.SS BITMAP CHANGES
A write-intent bitmap can be added to, or removed from, an active
.SS BITMAP CHANGES
A write-intent bitmap can be added to, or removed from, an active
-array. Either internal bitmaps, or bitmaps stored in a separate file
+array. Either internal bitmaps, or bitmaps stored in a separate file,
can be added. Note that if you add a bitmap stored in a file which is
in a filesystem that is on the raid array being affected, the system
will deadlock. The bitmap must be on a separate filesystem.
can be added. Note that if you add a bitmap stored in a file which is
in a filesystem that is on the raid array being affected, the system
will deadlock. The bitmap must be on a separate filesystem.
.I mdadm
performs a number of tests to determine if the device is part of an
.I mdadm
performs a number of tests to determine if the device is part of an
-array, and which array is should be part of. If an appropriate array
+array, and which array it should be part of. If an appropriate array
is found, or can be created,
.I mdadm
adds the device to the array and conditionally starts the array.
is found, or can be created,
.I mdadm
adds the device to the array and conditionally starts the array.
automatic inclusion of a new drive as a spare in some array.
.B "mdadm \-\-incremental"
automatic inclusion of a new drive as a spare in some array.
.B "mdadm \-\-incremental"
-requires a bug present in all kernels through 2.6.19, to be fixed.
-Hopefully this will be fixed in 2.6.20. Alternately apply the patch
+requires a bug-fix in all kernels through 2.6.19.
+Hopefully, this will be fixed in 2.6.20; alternately, apply the patch
which is included with the mdadm source distribution. If
.I mdadm
detects that this bug is present, it will abort any attempt to use
which is included with the mdadm source distribution. If
.I mdadm
detects that this bug is present, it will abort any attempt to use
in
.B mdadm.conf
which identifies the array (either by UUID, by name, by device list,
in
.B mdadm.conf
which identifies the array (either by UUID, by name, by device list,
-or by minor-number), the array was created with a
+or by minor-number), or the array was created with a
-matches that which is given in
.B mdadm.conf
or on the command line.
If
.B mdadm.conf
or on the command line.
If
-keeps a list of arrays that is has partly assembled in
+keeps a list of arrays that it has partially assembled in
.B /var/run/mdadm/map
(or
.B /var/run/mdadm.map
.B /var/run/mdadm/map
(or
.B /var/run/mdadm.map
means one device will start the array. For a clean raid5, the array
will be started as soon as all but one drive is present.
means one device will start the array. For a clean raid5, the array
will be started as soon as all but one drive is present.
-Note that neither of these approaches is really ideal. If it is can
+Note that neither of these approaches is really ideal. If it can
be known that all device discovery has completed, then
.br
.B " mdadm \-IRs"
be known that all device discovery has completed, then
.br
.B " mdadm \-IRs"
.B " mdadm \-\-assemble \-\-scan"
.br
.B " mdadm \-\-assemble \-\-scan"
.br
-This will assemble and start all arrays listed in the standard config file
+This will assemble and start all arrays listed in the standard config
file. This command will typically go in a system startup file.
.B " mdadm \-\-stop \-\-scan"
.br
file. This command will typically go in a system startup file.
.B " mdadm \-\-stop \-\-scan"
.br
-This will shut down all array that can be shut down (i.e. are not
+This will shut down all arrays that can be shut down (i.e. are not
currently in use). This will typically go in a system shutdown script.
.B " mdadm \-\-follow \-\-scan \-\-delay=120"
currently in use). This will typically go in a system shutdown script.
.B " mdadm \-\-follow \-\-scan \-\-delay=120"
.B " echo 'DEVICE /dev/hd[a\-z] /dev/sd*[a\-z]' > mdadm.conf"
.br
.B " mdadm \-\-examine \-\-scan \-\-config=mdadm.conf >> mdadm.conf"
.B " echo 'DEVICE /dev/hd[a\-z] /dev/sd*[a\-z]' > mdadm.conf"
.br
.B " mdadm \-\-examine \-\-scan \-\-config=mdadm.conf >> mdadm.conf"
-.ber
-This will find what arrays could be assembled from existing IDE and
-SCSI whole drives (not partitions) and store the information is the
+.br
+This will find arrays which could be assembled from existing IDE and
+SCSI whole drives (not partitions), and store the information in the
format of a config file.
This file is very likely to contain unwanted detail, particularly
the
format of a config file.
This file is very likely to contain unwanted detail, particularly
the
Create a list of devices by reading
.BR /proc/partitions ,
scan these for RAID superblocks, and printout a brief listing of all
Create a list of devices by reading
.BR /proc/partitions ,
scan these for RAID superblocks, and printout a brief listing of all
.B " mdadm \-Ac partitions \-m 0 /dev/md0"
.br
.B " mdadm \-Ac partitions \-m 0 /dev/md0"
.br
.SS /var/run/mdadm/map
When
.B \-\-incremental
.SS /var/run/mdadm/map
When
.B \-\-incremental
-mode is used. this file gets a list of arrays currently being created.
+mode is used, this file gets a list of arrays currently being created.
If
.B /var/run/mdadm
does not exist as a directory, then
If
.B /var/run/mdadm
does not exist as a directory, then
option.
The standard names for non-partitioned arrays (the only sort of md
option.
The standard names for non-partitioned arrays (the only sort of md
-array available in 2.4 and earlier) either of
+array available in 2.4 and earlier) are either of
.PP
where NN is a number.
The standard names for partitionable arrays (as available from 2.6
.PP
where NN is a number.
The standard names for partitionable arrays (as available from 2.6
''' See file COPYING in distribution for details.
.TH MDADM.CONF 5
.SH NAME
''' See file COPYING in distribution for details.
.TH MDADM.CONF 5
.SH NAME
-mdadm.conf \- configuration for management of Software Raid with mdadm
+mdadm.conf \- configuration for management of Software RAID with mdadm
.SH SYNOPSIS
/etc/mdadm.conf
.SH DESCRIPTION
.SH SYNOPSIS
/etc/mdadm.conf
.SH DESCRIPTION
.B MAILFROM
The
.B mailfrom
.B MAILFROM
The
.B mailfrom
-line (which can only be abbreviate at leat 5 characters) gives an
+line (which can only be abbreviated to at least 5 characters) gives an
address to appear in the "From" address for alert mails. This can be
useful if you want to explicitly set a domain, as the default from
address is "root" with no domain. All words on this line are
address to appear in the "From" address for alert mails. This can be
useful if you want to explicitly set a domain, as the default from
address is "root" with no domain. All words on this line are
.br
DEVICE /dev/hda1 /dev/hdb1
.br
DEVICE /dev/hda1 /dev/hdb1
-# /dev/md0 is known by it's UID.
+# /dev/md0 is known by its UID.
.br
ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
.br
.br
ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
.br
.br
ARRAY /dev/md1 superminor=1
.br
.br
ARRAY /dev/md1 superminor=1
.br
-# /dev/md2 is made from precisey these two devices
+# /dev/md2 is made from precisely these two devices
.br
ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
.br
ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
.SH NAME
mdassemble \- assemble MD devices
.I aka
.SH NAME
mdassemble \- assemble MD devices
.I aka
.SH DESCRIPTION
.B mdassemble
is a tiny program that can be used to assemble MD devices inside an
.SH DESCRIPTION
.B mdassemble
is a tiny program that can be used to assemble MD devices inside an
-initial ramdisk (initrd) or initramfs, it is meant to replace the in-kernel
+initial ramdisk (initrd) or initramfs; it is meant to replace the in-kernel
automatic raid detection and activation.
It can be built statically and linked against lightweight libc alternatives, like
.B dietlibc,
automatic raid detection and activation.
It can be built statically and linked against lightweight libc alternatives, like
.B dietlibc,