I set up a webserver a while ago and made a mistake. I do have the following: /dev/md0 swap (made from sda1 and sdb1) /dev/md1 /boot (made from sda2 and sdb2) /dev/md2 / (made from sda3 and sdb3) /dev/md3 /home (made from sda5 and sdb5)
/dev/md0 swap (made from sda1 and sdb1)
/dev/md1 /boot (made from sda2 and sdb2)
/dev/md2 / (made from sda3 and sdb3)
/dev/md3 /home (made from sda5 and sdb5)
I mistyped while setting up the RAID (I was using an installer script), and ended up with the following sizes: swap 10GB /boot 500MB / 50GB /home The Rest (About 1,8TB)
swap 10GB
/boot 500MB
/ 50GB
/home The Rest (About 1,8TB)
So, my plan was the following: 1 unmount /home 2 do an e2fsck on /dev/md3 3 resize2fs /dev/md3 to a size of about 990GB to have 10GB as a security margin 4 mdadm resize /dev/md3 to 1TB 5 resize2fs without naming a size to grow it to the maximum available on the new md
- unmount /home
- do an e2fsck on /dev/md3
- resize2fs /dev/md3 to a size of about 990GB to have 10GB as a security margin
- mdadm resize /dev/md3 to 1TB
- resize2fs without naming a size to grow it to the maximum available on the new md
(so far so good, everything up to this point worked) 6 add new partitions sda/b6 in the now free space 7 make them a raid 8 mount it to /mnt 9 copy over /var/www 10 diff /var/www and /mnt just to make sure 11 rm -rf * in /var/www 12 mount /dev/md4 to /var/www, and add a corresponding entry into fstab to make it permanent.
- add new partitions sda/b6 in the now free space
- make them a raid
- mount it to /mnt
- copy over /var/www
- diff /var/www and /mnt just to make sure
- rm -rf * in /var/www
- mount /dev/md4 to /var/www, and add a corresponding entry into fstab to make it permanent.