[CentOS] Upgrading drives in raid 1

Thu Jul 2 17:26:11 UTC 2009
Filipe Brandenburger <filbranden at gmail.com>

Hi Bob,

On Thu, Jul 2, 2009 at 13:18, Bob Hoffman<bob at bobhoffman.com> wrote:
>>If /dev/md1 is made out of /dev/sda2 and /dev/sdb2, it will not work,
>>as those partitions will still be the same size as they were before...
> The grow command is supposed to expand the size of that md1 from its current
> 200+GB to fill the rest of the 500gb drive.
> I thought you could then expand the lvm partions inside of that.

I'm not talking about the logical volumes (that you called lvm
partitions), but the physical partitions that make /dev/md1, which are
/dev/sda2, /dev/sdb2 and /dev/sdc2. You're not really supposed to
change the sizes of those, so although you will have a 500GB disk, you
will still have a 250GB partition...

Actually, it is indeed possible that you could fail a 250GB disk, add
a 500GB disk, create a larger partition on it and try to add it back
to /dev/md1, but I don't know if that will work or not, it might not
as the partitions are not exactly the same size, I never tried to do
something like that... If you want to try that, I suggest you have
good backups of your data before you start.

The other situation (copying the partition table of the smaller disk
to the bigger disk and creating new partitions) is one that I already
used many times, and it always worked right for me.