Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Russ Hammer <russ@perneus.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: How to grow RAID1 mirror on top of LVM?
Date: Fri, 02 May 2008 11:06:46 -0400	[thread overview]
Message-ID: <1209740806.4319.26.camel@russ-ifl90> (raw)
In-Reply-To: <18458.34575.416075.798546@notabene.brown>


On Fri, 2008-05-02 at 13:14 +1000, Neil Brown wrote:
> On Monday April 28, taeuber@bbaw.de wrote:
> > Hallo Neil,
> > 
> > Neil Brown <neilb@suse.de> schrieb:
> > > On Thursday March 13, aia21@cam.ac.uk wrote:
> > > > 
> > > > Is there a better way to do this?  I am hoping someone will tell me to  
> > > > use option blah to utility foo that will do this for me without having  
> > > > to break the mirror twice and resync each time.  (-;
> > > 
> > > Sorry, but no.  This mode of operation was never envisaged for md.
> > > I would always put the md/raid1 devices below the LVM.
> > 
> > could you write in some short words what in the design prohibits us to grow a raid1 on a grown lvm?
> 
> By default, the metadata for an md array is stored near the end of
> each device.  If you make the device larger, you lose the metadata.
> This could be address for on-line resizing by having some protocol
> whereby the LVM layer tells whoever is using it that it is about to
> become larger, so that the metadata can be updated and moved, but that
> is probably more hassle than it is worth.
> 
> If you use version 1.1 or 1.2 metadata, the metadata is stored at the
> start of the device, so it doesn't get lost.  However the metadata has
> recorded in it the amount of usable space on the device.  When you
> make the device bigger you would need to update this number.
> There is currently no way to update this for an active array.
> 
> You can stop the array, and the re-assemble it with 
>    --update=devicesize
> 
> this will update the field in the metadata which records the size of
> each device.  You will then be able to grow the array to make use of
> all the space.
> 
> It might not be to hard to make it possible to tell md that devices
> have grown.... maybe one day :-)
> 
> NeilBrown

I'm concerned, I'm currently planning on swapping two 250GB drives with
750GB drives on a RAID1 array using 2.6.9 RHEL 4.6 (mdadm mdadm-1.12.0).

My plan basically was:

# remove one small disk
/sbin/mdadm /dev/md0 --fail /dev/sdb1
/sbin/mdadm /dev/md0 --remove /dev/sdb1

# shutdown and swap in large disk
# (with larger partition for the RAID1 component)
# add large drive into array
/sbin/mdadm /dev/md0 --add /dev/sdb1

# Allow the array to resync
# remove the remaining small drive
/sbin/mdadm /dev/md0 --fail /dev/sda1
/sbin/mdadm /dev/md0 --remove /dev/sda1

# Grow the array
/sbin/mdadm -G /dev/md0 -z max

# shutdown and swap in second large disk
# (with larger partition for the RAID1 component)
# add in the second large drive
/sbin/mdadm /dev/md0 --add /dev/sda1

My concern (based on this discussion) is that this will fail because I
am changing the size of the partition underlying the RAID1 array, much
like the LVM discussion above, while using ver 0.90 superblock.

Do I have a legitimate concern??

Thanks,
Russ Hammer






  parent reply	other threads:[~2008-05-02 15:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 11:21 How to grow RAID1 mirror on top of LVM? Anton Altaparmakov
2008-03-25  5:36 ` Neil Brown
2008-03-25  8:00   ` Anton Altaparmakov
2008-04-28 14:25   ` Lars Täuber
2008-04-28 15:09     ` David Lethe
2008-04-29  7:55       ` Lars Täuber
2008-04-29 13:21         ` David Lethe
2008-05-02  3:14     ` Neil Brown
2008-05-02  7:23       ` Lars Täuber
2008-05-02 15:06       ` Russ Hammer [this message]
2008-05-04 11:20         ` Neil Brown
2008-05-05  7:10           ` Lars Täuber
2008-05-06 12:34           ` Russ Hammer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1209740806.4319.26.camel@russ-ifl90 \
    --to=russ@perneus.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox