[CentOS] Upgrading drives in raid 1

Robert Heller

heller at deepsoft.com
Thu Jul 2 18:05:59 UTC 2009


At Thu, 2 Jul 2009 13:26:11 -0400 CentOS mailing list <centos at centos.org> wrote:

> 
> 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.

According to the mdadm man page, a RAID1 set can be made from different
sized disks/partitions.  It will be sized the size of the smallest
disk/partition in the set.  Going through a series of fail/replace you
could end up with a RAID1 set that is smaller than the smallest
disk/partition, at which point the GROW option will grow the RAID1 set. 
And no, I have not done this.  It also states that the kernel needs have
the proper support to do this.

> 
> 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.
> 
> HTH,
> Filipe
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                                                                                         



More information about the CentOS mailing list