[linux-lvm] shift PV from disk to raid device?

Doug Ledford dledford at redhat.com
Tue Dec 9 21:22:44 UTC 2008


On Tue, 2008-12-09 at 16:03 -0500, Stuart D. Gathman wrote:
> On Tue, 9 Dec 2008, Kai Schaetzl wrote:
> 
> > > The solution to this problem is to create the raid device with a
> > > superblock format of 1.1 or 1.2 (aka, -e 1.1 or -e 1.2).
> > 
> > Is this an option to mdraid? mdadm --create --help doesn't show me this 
> > option. Might mdadm-2.6.4-1.el5 on 5.2 be too old? Or is this an option to 
> > fdisk/sfdisk?
> 
> I don't think changing the raid superblock will help.  I generally
> prefer having the superblock at the end - there are times when you
> *do* want sda3/sdb3 to alias md3:

Nope.  This is never true.

>  o many versions of grub will not install on md? - you have to unmount /boot,
>  break mirror, mount sd? on /boot, install grub, unmount /boot, mount md? on
>  /boot again, add back mirror copy of /boot.

Grub will install just fine, however you have to do it manually because
anaconda gets it wrong.  The correct way to install grub on a
raid1 /boot partition is to wait until anaconda gives you the "Done with
install, press the reboot button" prompt, then switch to vt2 where you
have a bash prompt, run grub, then run these commands (assuming that
your /boot raid1 is on partition 1 of disk sda and sdb):

device (hd0) /dev/sda
root (hd0,0)
install --stage2=/grub/stage2 /grub/stage1 (hd0) e2fs_stage1_5
p /grub/stage2 /grub/grub.conf
device (hd0) /dev/sdb
root (hd0,0)
install --stage2=/grub/stage2 /grub/stage1 (hd0) e2fs_stage1_5
p /grub/stage2 /grub/grub.conf
quit

>  o Also, when recovering a system, it is helpful to be able to mount a
>  partition directly, without setting up the raid devices.  I've had customers
>  remove a mirror copy and mail me the disk.  I can then mount the filesystems
>  directly, while they keep operating.

Again, this is never true.  For a raid1 array, you can always bring the
array up in degraded mode and access it that way.  Doing what you are
talking about can lead to silent data corruption if you ever bring the
raid drives back together and reassemble the array.

> The key is breaking the aliasing and copying the data to a proper md? PV.
> 
-- 
Doug Ledford <dledford at redhat.com>
              GPG KeyID: CFBFF194
              http://people.redhat.com/dledford

Infiniband specific RPMs available at
              http://people.redhat.com/dledford/Infiniband

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20081209/0bcb8b2a/attachment.sig>


More information about the linux-lvm mailing list