LVM not fit for Fedora Core

Daniel Yek dyek at real.com
Sun Dec 24 16:26:58 UTC 2006


At 11:15 AM 12/22/2006, Lamont Peterson wrote:
>On Friday 22 December 2006 09:55am, Daniel Yek wrote:
>...
> > I did stop using it after one of my hard drive started to fail and I plug
> > both hard drives into another Fedora Core machine also configured with LVM,
> > and I couldn't find a way to boot up that machine with both sets of LVM.
> > IIRC, it complained about 2 logical partitions of the same names
> > (collision), or something like that. With the extra LVM volume removed, I
> > could boot; but with them plugged in, I couldn't boot (the otherwise
> > healthy LVM volumes) at all.
>...
> > Is there a solution for such situation? ...
>
>Yup.  Really simple fix.  Rename one of the VGs with "vgrename".  Some 
>ways of
>doing this:
>...
>2.  Rename the VG on the hosting system (i.e. the box you're putting the 
>disks
>into.  This requires a number of simple steps to complete successfully.
>
>To use vgrename, the entire VG must be offline.  So, boot a rescue 
>environment
>(via CD, PXE, however), skip trying to mount up the disk (or use
>the "nomount" option on the "rescue" boot: line), and run (assuming the old
>name is "vg0" and the new name should be "herold":
>
># lvm
>lvm> vgscan
>. . . output omitted . . .
>lvm> vgchange -a n vg0
>. . . output omitted . . .
>lvm> vgrename vg0 herold
>. . . output omitted . . .
>lvm> vgchange -a y herold
>. . . output omitted . . .
>lvm> exit
>
>Then, mount up the root LV, the /boot/ partition, and things like /usr/
>and /dev/:
>
># mkdir /mnt/sysimage
># mount /dev/herold/root /mnt/sysimage
># mount /dev/sda1 /mnt/sysimage/boot
># mount /dev/herold/usr /mnt/sysimage/usr
>
>Of course, change the names of the devices appropriately.
>
>You can then "chroot" and run "mkinitrd" to fix up the name of the root 
>device
>(because the VG name changed).  Also, don't forget to change the "root="
>value(s) in grub.conf (menu.lst on any other distribution).  I usually just
>snag the mkinitrd command out of the "/sbin/new-kernel-pkg" script
>(use "rpm -q --scripts kernel-`uname -r`" to see that's what the kernel RPMs
>run).

A bit complicated perhaps and haven't tried it yet, but that is great 
information for me to try out later. Thanks much.


>...
>--
>Lamont Peterson <lamont at gurulabs.com>
>Senior Instructor
>Guru Labs, L.C. [ http://www.GuruLabs.com/ ]

-- 
Daniel Yek




More information about the fedora-devel-list mailing list