This is needed when
.B \-\-grow
is used to increase the number of
- raid-devices in a RAID5 if there are no spare devices available.
- See the section below on RAID_DEVICE CHANGES. The file should be
- stored on a separate device, not on the raid array being reshaped.
+ raid-devices in a RAID5 if there are no spare devices available.
+ See the GROW MODE section below on RAID\-DEVICES CHANGES. The file
+ should be stored on a separate device, not on the RAID array being
+ reshaped.
+.TP
+.BR \-\-array-size= ", " \-Z
+Set the size of the array which is seen by users of the device such as
+filesystems. This can be less that the real size, but never greater.
+The size set this way does not persist across restarts of the array.
+
+This is most useful when reducing the number of devices in a RAID5 or
+RAID6. Such arrays require the array-size to be reduced before a
+reshape can be performed that reduces the real size.
+
+A value of
+.B max
+restores the apparent size of the array to be whatever the real
+amount of available space is.
+
.TP
.BR \-N ", " \-\-name=
Set a
If the md device name is in a 'standard' format as described in DEVICE
NAMES, then it will be created, if necessary, with the appropriate
- number based on that name. If the device name is not in one of these
- formats, then a unused minor number will be allocated. The minor
+ device number based on that name. If the device name is not in one of these
+ formats, then a unused device number will be allocated. The device
number will be considered unused if there is no active array for that
number, and there is no entry in /dev for that number and with a
- non-standard name. Name that are not in 'standard' format are only
+ non-standard name. Names that are not in 'standard' format are only
allowed in "/dev/md/".
- \".TP
- \".BR \-\-symlink = no
- \"Normally when
- \".B \-\-auto
- \"causes
- \".I mdadm
- \"to create devices in
- \".B /dev/md/
- \"it will also create symlinks from
- \".B /dev/
- \"with names starting with
- \".B md
- \"or
- \".BR md_ .
- \"Use
- \".B \-\-symlink=no
- \"to suppress this, or
- \".B \-\-symlink=yes
- \"to enforce this even if it is suppressing
- \".IR mdadm.conf .
- \"
+.ig XX
+ .\".TP
+ .\".BR \-\-symlink = no
+ .\"Normally when
+ .\".B \-\-auto
+ .\"causes
+ .\".I mdadm
+ .\"to create devices in
+ .\".B /dev/md/
+ .\"it will also create symlinks from
+ .\".B /dev/
+ .\"with names starting with
+ .\".B md
+ .\"or
+ .\".BR md_ .
+ .\"Use
+ .\".B \-\-symlink=no
+ .\"to suppress this, or
+ .\".B \-\-symlink=yes
+ .\"to enforce this even if it is suppressing
+ .\".IR mdadm.conf .
+ .\"
+.XX
.SH For assemble:
When the number of devices is increased, any hot spares that are
present will be activated immediately.
-Increasing the number of active devices in a RAID5 is much more
+Changing the number of active devices in a RAID5 or RAID6 is much more
effort. Every block in the array will need to be read and written
-back to a new location. From 2.6.17, the Linux Kernel is able to do
-this safely, including restarting an interrupted "reshape".
+back to a new location. From 2.6.17, the Linux Kernel is able to
- increase the number of devices in a RAID5 safely, including restart
- and interrupted "reshape". From 2.6.31, the Linux Kernel is able to
++increase the number of devices in a RAID5 safely, including restarting
++an interrupted "reshape". From 2.6.31, the Linux Kernel is able to
+increase or decrease the number of devices in a RAID5 or RAID6.
+
+When decreasing the number of devices, the size of the array will also
+decrease. If there was data in the array, it could get destroyed and
+this is not reversible. To help prevent accidents,
+.I mdadm
+requires that the size of the array be decreased first with
+.BR "mdadm --grow --array-size" .
+This is a reversible change which simply makes the end of the array
+inaccessible. The integrity of any data can then be checked before
+the non-reversible reduction in the number of devices is request.
- When relocating the first few stripes on a raid5, it is not possible
+ When relocating the first few stripes on a RAID5, it is not possible
to keep the data on disk completely consistent and crash-proof. To
provide the required safety, mdadm disables writes to the array while
this "critical section" is reshaped, and takes a backup of the data