Resizing Software RAID Arrays with mdadm
99
no
vd
ocx
(e
n)
6 Ap
ril 20
07
This option is possible only if no other file systems on the original disk are accessed by the
system. When the replacement device is added back into the RAID, it takes much longer
to synchronize the data.
5
Re-add the partition to the RAID array. For example, to add
/dev/sda1
, enter
mdadm -a /dev/md0 /dev/sda1
Wait until the RAID is synchronized and consistent before continuing with the next partition.
6
Repeat
Step 2
through
Step 5
for each of the remaining component devices in the array. Make
sure to modify the commands for the correct component partition.
7
If you get a message that tells you that the kernel could not re-read the partition table for the
RAID, you must reboot the computer after resizing all of its component partitions.
8
Continue with
Section 8.3.3, “Decreasing the Size of the RAID Array,” on page 99
.
8.3.3 Decreasing the Size of the RAID Array
After you have resized each of the component partitions in the RAID, the RAID array configuration
continues to use the original array size until you force it to be aware of the newly available space.
You can specify a size for the RAID or use the maximum available space.
The procedure in this section uses the device name
/dev/md0
for the RAID device. Make sure to
modify commands to use the name of your own device.
1
Open a terminal console, then log in as the
root
user or equivalent.
2
Check the size of the array and the device size known to the array by entering
mdadm -D /dev/md0 | grep -e "Array Size" -e "Device
Size"
3
Do one of the following:
Increase the size of the array to the maximum available size by entering
mdadm --grow /dev/md0 -z max
Increase the size of the array to a specified value by entering
mdadm --grow /dev/md0 -z
size
Replace
size
with an integer value in kilobytes for the desired size. (A kilobyte is 1024
bytes.)
4
Recheck the size of your array and the device size known to the array by entering
mdadm -D /dev/md0 | grep -e "Array Size" -e "Device
Size"
5
Do one of the following:
If your array was successfully resized, you are done.
If your array was not resized as you expected, you must reboot, then try this procedure
again.
Summary of Contents for LINUX ENTERPRISE SERVER 10 - STORAGE ADMINISTRATION GUIDE 7-2007
Page 4: ...novdocx en 6 April 2007...
Page 30: ...30 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 42: ...42 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 58: ...58 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 90: ...90 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 100: ...100 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 106: ...106 SLES 10 Storage Administration Guide novdocx en 6 April 2007...