Argo hard drive upgrade with growing RAID1 array

Tagged:  •  

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
> device (hd0) /dev/sdb
> root (hd0,0)
> 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 -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              229G   64G  154G  30% /

Thanks for the link to the Dell doc; there are some useful hints in there I have not thought of.

dudes! you're awesome!!! thank you for posting this. it is EXACTLY what i needed. i am growing a 2x73gb scsi raid1 mirror on CentOs 5.0 to 2x300gb scsi raid1 mirror on a dell 2800. yes, the server is a beast, but oh so durable. never a prob with the hardware at all!

mdadm and resize2fs are totally cool and get around the dell perc gui. i will post back to let you know how i come out. btw, what kind of time did it take you to sync both of the new drives?

Sorry, it's been awhile since we did this.  I think it took a couple hours for each drive, so the process definitely took some time.  It's best to be done if you can have someone plug a drive in, wait, do the other drive, etc without having to sit around for the whole process.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.
Syndicate content