How To Resize LVM Software RAID1 Partitions (Shrink & Grow) - Page 4
3.2 Growing A Degraded ArrayBefore we boot into the rescue system, we must make sure that /dev/sda5 is really removed from the array: mdadm --manage /dev/md1 --fail /dev/sda5 Then we overwrite the superblock on /dev/sda5 (this is very important - if you forget this, the system might now boot anymore after the resizal!): mdadm --zero-superblock /dev/sda5 Boot into your rescue system and activate all needed modules: modprobe md Then activate your RAID arrays... cp /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf_orig mdadm -A --scan ...and start LVM: /etc/init.d/lvm start Now we can grow /dev/md1 as follows: mdadm --grow /dev/md1 --size=max --size=max means the largest possible value. You can as well specify a size in KiBytes (see previous chapter). Then we grow the PV to the largest possible value... pvresize /dev/md1 ... and take a look at vgdisplay root@Knoppix:~# vgdisplay We have 194 free PE that we can allocate to our /dev/server1/root LV: lvextend -l +194 /dev/server1/root Then we run a file system check... e2fsck -f /dev/server1/root ..., resize the file system... resize2fs /dev/server1/root ... and check the file system again: e2fsck -f /dev/server1/root Then boot into the normal system again and run the following two commands to add /dev/sda5 back to the array /dev/md1: mdadm --zero-superblock /dev/sda5 Take a look at cat /proc/mdstat and you should see that /dev/sdb5 and /dev/sda5 are now being synced.
4 Links
|



Recent comments
1 day 3 hours ago
1 day 4 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 7 hours ago
1 day 10 hours ago
1 day 12 hours ago
1 day 14 hours ago
2 days 4 hours ago
2 days 20 hours ago