RAID – Grow existing array…

Unmount the array, i don’t know if this is necessary, but doing so means less stuff to go wrong.
sudo umount /dev/md0

Then you need to go and prepare the disk(s) to be added. (The prepare section of the guide)

Then tell mdadm that it can play with it:
sudo mdadm --add /dev/md0 /dev/sda2

Then tell mdadm to stop playing and use it to expand/grow your raid5 array(make sure that the number of raid devices is correct, it should be the number of disks/partitions the grown/expanded array will have):
sudo mdadm --grow /dev/md0 --raid-devices=4

View and wait for the new array to reshape:
cat /proc/mdstat

Check the filesystem (required to resize it):
sudo e2fsck -f /dev/md0

Resize the filesystem on the new array so that you can use it for something useful.
sudo resize2fs /dev/md0

Mount the expanded/grown array with it’s resized filesystem(remember to change the mount point):
sudo mount -t ext3 /dev/md0 /home/tore/raid

Go check your files:
cd /home/tore/raid
cksfv -r -q

REF: http://ubuntuforums.org/archive/index.php/t-517282.html

Leave a Reply