Argo hard drive upgrade with growing RAID1 array

Yesterday Kevin and I swapped in some 250G hard drives for our old 80G drives. The 80G drives were setup in a RAID-1 configuration. With our recent upgrade to CentOS 5 we gained the ability to do online growing of RAID-1 arrays, so it was a good time to upgrade (actually, it was planned that way ;-P).

So the first step was swapping the new drives in and letting the array resync each time. When replacing the drives, we also modified the partition so it utilized the entire disk.

Old disk:

/dev/sdb3 : start=  2313360, size=158513355, Id=fd

New disk:

/dev/sdb3 : start=  2313360, size=486078705, Id=fd

Then, all was required was to re-add the disk to the array to get it syncing:

$ mdadm --manage --add /dev/md1  /dev/sdb3

After each drive was finished syncing, we needed to get grub setup on the device again to use its own copy of /boot (props to the Dell Software Raid and Grub HOW-TO).

$ grub<br />> device (hd0) /dev/sdb<br />> root (hd0,0)<br />> setup (hd0)

These steps were performed again for the other drive.

After both new drives were in, it was time to grow the RAID-1 array:

$ mdadm --grow /dev/md1 --size=max

After the array finished syncing, it was time to resize the filesystem:

$ resize2fs

And that leaves us with a much larger root partition! Where it was 90% full before, it's now 30% full:

    $ df -hFilesystem            Size  Used Avail Use% Mounted on/dev/md1              229G   64G  154G  30% /