[lug] upgrading sw raid 1 hard drives to larger size

David L. Anselmi anselmi at anselmi.us
Wed Aug 12 22:37:42 MDT 2009

karl horlen wrote:
> i've currently got centos 5 raid 1 system with small drives.  i'd
> like to upgrade both drives to larger capacities.  i only have two
> drive slots in my rack system.  so i have to replace the drives that
> are currently in the system.

This looks close:


There might be cooler ways to do it but this seems to meet your needs.

> if so, could someone offer up some guidelines / steps to how to do
> this?  i installed it with LVM which might complicate the matter.

Yes, it does.  The above link grows the md device to match the physical 
partition, and then grows the ext3 fs to match the md device.

You'll need to grow the PV to match the md device.  But maybe that's 
cooler than we need.

Ah, here's some info about pvresize (if you can wade through the rest):


But suppose your drives are 80GB and you put in new 300GB drives. 
Follow the directions on the first link and make the first partition the 
same 80GB.  Rebuild the array on to that.

To use the rest of the disk, add partitions to it (one is easy, you can 
do more if you want more flexibility) and then create PVs out of them. 
You can add blocks from those PVs to your LVs as you need them.


More information about the LUG mailing list