linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Russ Hammer <russ@perneus.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: How to grow RAID1 mirror on top of LVM?
Date: Sun, 4 May 2008 21:20:57 +1000	[thread overview]
Message-ID: <18461.39961.921994.904814@notabene.brown> (raw)
In-Reply-To: message from Russ Hammer on Friday May 2

On Friday May 2, russ@perneus.com wrote:
> 
> 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??

Your recipe is perfect.  You need not be concerned.

You are *not* changing the size of the partition underlying the RAID1
array.  When you change the size of a partition, it is not part of the
array at that time.  It has no superblock on it, so there is no room
to be confused.

If you were to make a small partition on the new sdb, add that to the
array, then change the partition table to make sdb1 bigger, that would
cause confusion.
However as you are making sdb1 nice and be before including it in the
array, everything should work perfectly.

The only possible problem area in your recipe is if the drives are not
actually identical (not all 750GB drive have the same number of
blocks), the array you get with the -G command might be too big to
allow the partition you create on the new sda.  However if the drives
do have exactly the same number of sectors, this will not be a problem.

NeilBrown



  reply	other threads:[~2008-05-04 11:20 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
2008-05-04 11:20         ` Neil Brown [this message]
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=18461.39961.921994.904814@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=russ@perneus.com \
    /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;
as well as URLs for NNTP newsgroup(s).