View previous topic :: View next topic |
Author |
Message |
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2366 Location: Kentucky
|
Posted: Wed May 19, 2004 7:42 pm Post subject: root under LVM fails with more than 1 volume group |
|
|
I have several machines booting with the root partition under LVM-1 and the 2.4..25 kernel from the gentoo-sources. One of my machines will not boot that way, and I narrowed it down to the fact that it has 2 volume groups on it, whereas the others only have 1 volume group. I even removed the second volume group from the failing machine, and Voila! It booted fine.
BTW that second volume group, "pg", is composed of 2 "whole disks", whereas the first volume group, "gentoo", is a single partition on a different disk.
So we seem to have a problem with the initrd file created by lvmcreate_initrd in that it only works with a single volume group.
I uncompressed the /boot/initrd-lvm-2.4.25-gentoo-r2.gz file created by lvmcreate_initrd and mounted the result ala loopback to take a look at it. The /linuxrc file has a shell script in it that does a vgchange -a y to set all volume groups active. I wrote the uncompressed file to /boot and edited my /boot/grub/grub.conf to use that for the initrd, just in case there was a problem writing to a compressed ramdisk image, but it made no difference.
Before the kernel panic, the console shows the following:
Code: | RAMDISK: ext2 filesystem found at block 0
RAMDISK: loading 3126 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 3126k freed
VFS: Mounted root (ext2 filesystem)
Mounted devfs on /dev
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found inactive volume group "pg"
vgscan -- found inactive volume group "gentoo"
vgscan -- ERROR 2 writing volume group backup file /etc/lvmtab.d/gentoo.tmp in vg_cfgbackup.c [line 273]
vgscan -- ERROR: unable to do a backup of volume group "gentoo"
vgscan -- ERROR "lvm_tab_vg_remove(): unlink" removing volume group "gentoo" from "/etc/lvmtab"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume groups
vgchange -- volume group "pg" successfully activated
VFS: Cannot open root device "gentoo/root" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00
|
So it seems to me that there is something funky about the fact that vgscan gets an ERROR 2 writing the volume group backup file for "gentoo". I also tried renaming the "gentoo" volume group to "aa" and to "zz" to see if alphabetical order affected anything. Nope. My only other suspicion is that it has to do with the fact that I have one vg composed of a pair of whole disks, and another composed of only a single partition. These volume groups work fine when the system is booted from a non-LVM root filesystem.
In case it matters, when I boot from LVM root, the root filesystem is reiserfs, whereas when I boot from non-LVM root, the root filesystem is ext2. I fail to see that this should matter. I just mention it for completeness.
Has anyone else seen this sort of aberrant behavior?
Does anyone know how to fix it? |
|
Back to top |
|
|
Moriah Advocate
Joined: 27 Mar 2004 Posts: 2366 Location: Kentucky
|
Posted: Wed May 19, 2004 8:19 pm Post subject: Versions out of sync? |
|
|
Now I am befuddled!
I just tried to look at the offending source file, vg_cfgbackup.c, and I could not find it. It should have been there, as I did a stage1 install. So I did an emerge -f lvm-user and untarred the dist file. Suprise: there is no source file in the tarball named vg_cfgbackup.c, but there is one named vgcfgbackup.c, without the underscore. Hmm... Well, undaunted, I opened the source file up and tried to goto line 273, and the file is only 179 lines long!
Looks like the LVM userland tools that lvmcreate_initrd uses are not the same ones that my gentoo system is using once it gets booted!
What gives?
Looking at the script in /sbin/lvmcreate_initrd it looks like it just copies the /sbin/vgscan that the system is using.
I do not understand... |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Thu May 20, 2004 6:00 pm Post subject: |
|
|
Moved from Documentation, Tips and Tricks. Please don't post support questions there. _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|