[TriLUG] How to migrate LVM to LVM on Raid-1

Rick DeNatale rick.denatale at gmail.com
Mon Feb 20 14:37:30 EST 2006


Okay, I bit the bullet this morning and started the conversion.

I'm at the testing to see that it's the "same system" stage.  So far
it looks good, but for one grub(by) little detail.

I THOUGHT that I should be able to setup /boot/grub/menu.lst on both
drives to have entries which booted off the other physical hard drive.
So I set up menu.lst to have entries like this:

title           Ubuntu, kernel 2.6.12-10-686-smp
root            (hd0,0)
kernel          /vmlinuz-2.6.12-10-686-smp
root=/dev/mapper/Ubuntu-root ro quiet splash
initrd          /initrd.img-2.6.12-10-686-smp
savedefault
boot

title           Ubuntu, kernel 2.6.12-10-686-smp Second SCSI Drive
root            (hd1,0)
kernel          /vmlinuz-2.6.12-10-686-smp
root=/dev/mapper/MainVG-root ro quiet splash
initrd          /initrd.img-2.6.12-10-686-smp
savedefault
boot

If I leave the (scsi) bios set up to boot from /dev/sda and I select
the second boot stanza, grub complains of an unrecognizable filesystem
type on the root command.  The system id of the partition is 0x83, and
it's marked  bootable.  And it has an ext3 file system which is a copy
of the boot partition from /dev/sda1.

So the next thing I did was to change the menu.lst on
/dev/sdb1/boot/grub to use (hd0,0) for root and the new volume group
name.  I then changed the settings in the scsi bios to boot from this
drive, and I'm up with the new filesystem on the raid. (I created a
file in my home directory in the new filesystem so that I can tell the
difference).

So now, I'm still a wee bit confused. Why can't I put (hd1,0) for root
in menu.lst to boot the other?  Do I need to chainload with something
like

rootnoverify (hd1,0)
makeactive
chainloader +1
boot

The other question I've got is whether or not it's permissible to put
the two boot partitions on these two drives into a raid1 array
themselves, or will grub get confused by this?  The issue is manually
syncing them when I install/remove kernel packages for maintenance.
--
Rick DeNatale



More information about the TriLUG mailing list