Re: lvm boot from second volume group

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



list user wrote:
Paul Howarth wrote:
list user wrote:

Hi everybody!

I'm using fc4 and working with xen, and it works great, but I've come upon an issue that I don't know how to resolve.

I've many different images and configurations using lvm and grub to multi-boot. To keep things easy (for me) I use IDE drives and the motherboard's built-in IDE interfaces.

I added another volume group, vg1, to my lvm setup, and placed an fc4 tree on it, and added an entry to grub.conf. However, when I try to boot into that image it fails. Same image on volume group 0 (vg0) will boot.

Has anybody managed to use grub to boot from a second volume group?

I suspect that it may be an initrd issue, but don't know for sure.

Any pointers or suggestions would be appreciated.


I don't really get what you're asking. grub doesn't understand LVM at all AFAIK, it just boots the kernel/initrd from a regular partition (/boot) and passes parameters to that kernel to tell it where to find the root filesystem.

So when you say "boot into that image", what do you mean? Where is the kernel and initrd, and what does the grub.conf entry look like?

Thanks for the reply, Paul.  It took me a while to get back to you
because I ran through this again to make sure of what I was(n't) seeing.

My original install uses lvm and was installed to /dev/vg0/fc4.  Using
the lvm tool "vgcreate" I made /dev/vg1, then lvcreate to make
/dev/vg1/fc4.  Once /dev/vg1/fc4 was formatted and mounted I copied
vg0/fc4 to vg1/fc4, edited vg1/fc4/etc/fstab to point to the correct lv.

Now booting into either shows that both lv's are seen and recognized
during the boot process, but booting into vg1/fc4 fails after the line
"Creating root device".

Everything _seems_ to be OK but just won't work.  So, as an experiment,
I tried a clean install and this is what was found.

During the partitioning section /dev/vg1 was not there; it was shown as
a raw partion (/dev/hda3) of type ext3 so I turned it into an lvm and
proceeded with the install.  It now boots into /dev/vg1/fc4!

In summary, during the boot process into either volume group both volume
groups were seen and recognized, but the one that was built using the
lvm tools wouldn't boot successfully, and then going through the install
process showed that the installer didn't recognize the second volume
group as an "lvm" but as "ext3".

I haven't a clue as to why.  I don't understand the inner workings of
lvm and how they identify themselves or are identified.  Is this a
labeling issue?  Is it perhaps that the lvm created using the tools
didn't remark the partition table with type "lvm"?  Dunno.

Now that it has been marked as "lvm" I will try copying another instance
of fc4 onto vg1 and try booting into it to see if that solved the
original problem.

At any rate, I will post my results.

When you created the second volume group (vg1), did you just do a pvcreate on the target partition, which had previously been used by an ext3 filesystem? From your description above, it sounds like that's what you did, without using fdisk to change the partition type to "Linux LVM" instead of ext3. So I'd guess the boot process didn't look for LVM volumes on partitions not marked as such. It's a theory anyway!

Paul.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux