Skip to contentSkip to conversation

Problems mounting LVM root volume

linux-lvm Patrick van den Berg 4 participants 5 messages Dec 28, 2002 – Jan 15, 2003

lore
Share & tools
lore
#0 lore raw

Hello everybody,

I'm new at using LVM and I ran into trouble using it. I've got problems mounting an LVM volume as root on my system running Gentoo Linux 1.4. My configuration is as follows (skip to the bottom of the text for the actual error message):

Gigabyte mainboard with onboard Promise RAID. I've got 2 80GB discs attached (same model) and configured as RAID1. I installed via the Gentoo RC1 Stage 1 CDROM. During boot of the CD I had to abort and add the "IDE0=0x9400,0x9802 IDE2=0x9c00,0xa002" parameters to be able to load the pdcraid module.

My fstab looks as follows:

/dev/ataraid/disc0/part1  /boot       ext3      noauto,noatime  1  1 
/dev/vg3/rootlv           /           reiserfs  noatime         0  0 
/dev/ataraid/disc0/part2  none        swap      sw              0  0 
/dev/cdroms/cdrom0        /mnt/cdrom  iso9660   noauto,ro       0  0 
proc                      /proc       proc      defaults        0  0 
tmpfs                     /dev/shm    tmpfs     defaults        0  0 

I also compiled my kernel using the gentoo-sources, and with the following options enabled:

- LVM support
- Built-in RAM disk support with initrd
- DEV fs support
- mount DEV filesystem at boot
- ReiserFS support

I also ran lvmcreate_initrd with the -M option, because everything is compiled in the kernel. Also, when I run lvmceate_initrd without the -M options, it returns errors and the lvm image is not created.

My grub,conf (linked to menu.lst) looks as follows:

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo 1.4 GNU/Linux on Antigone
root (hd0,0)
kernel /boot/bzImage root=/dev/vg3/rootlv ide0=0x9400,0x9802 ide2=0x9c00,0xa002 initrd /boot/initrd-lvm.gz

When I boot the system grub starts correctly, but when grub wants to boot my system the following messages appear:

Code: 

RAMDISK: Compressed image found at block 0
Freeing initrd memory: 994k freed.
VFS: Mounted root (ext2 filesystem).
Mounted devfs on /dev
vgscan -- found inactive volume group "vg3"
vgscan -- ERROR 28 writing volumegroup backup file /etc/lvmtab.d/vg3.tmp in vg_cfgbackup.c [line273]
vgscan -- ERROR: "lvm_tab_vg_remove(): unlink" removing volume group "vg3" from "/etc/lvmtab.d"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" succesfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume group

vgchange -- no volume groups found

VFS: Cannot open root device "vg3/rootlv" or 00:00 Please append a correct "root=" boot option

Kernel panic: VFS: Unable to mount rootfs on 00:00 

Now, the strange thing is, when I boot via the CD and do vgscan and vgchange -ay by hand, I can mount /dev/vg3/rootlv normally!

Does anybody got any ideas? I've run out of them

Thanks for any help in advance. When you need any more info, just say so.

Regards,
Patrick

#1 lore raw

Hello Patrick,

There is not enough space ("vgscan -- ERROR 28" check the file "/usr/include/asm/errno.h") in the ramdisk to create the file "/etc/lvmtab.d/vg3.tmp"

What files did you copy to your ramdisk ?

Best regards.

Francis

Quoted 54 lines · Patrick van den Berg

Hello everybody,

I'm new at using LVM and I ran into trouble using it. I've got problems mounting an LVM volume as root on my system running Gentoo Linux 1.4. My configuration is as follows (skip to the bottom of the text for the actual error message):

Gigabyte mainboard with onboard Promise RAID. I've got 2 80GB discs attached (same model) and configured as RAID1. I installed via the Gentoo RC1 Stage 1 CDROM. During boot of the CD I had to abort and add the "IDE0=0x9400,0x9802 IDE2=0x9c00,0xa002" parameters to be able to load the pdcraid module.

My fstab looks as follows:

/dev/ataraid/disc0/part1 /boot ext3 noauto,noatime 1 1 /dev/vg3/rootlv / reiserfs noatime 0 0 /dev/ataraid/disc0/part2 none swap sw 0 0 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 proc /proc proc defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0

I also compiled my kernel using the gentoo-sources, and with the following options enabled:

- LVM support
- Built-in RAM disk support with initrd
- DEV fs support
- mount DEV filesystem at boot
- ReiserFS support

I also ran lvmcreate_initrd with the -M option, because everything is compiled in the kernel. Also, when I run lvmceate_initrd without the -M options, it returns errors and the lvm image is not created.

My grub,conf (linked to menu.lst) looks as follows:

default 0 timeout 30 splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo 1.4 GNU/Linux on Antigone root (hd0,0) kernel /boot/bzImage root=/dev/vg3/rootlv ide0=0x9400,0x9802 ide2=0x9c00,0xa002 initrd /boot/initrd-lvm.gz

When I boot the system grub starts correctly, but when grub wants to boot my system the following messages appear:

Code: RAMDISK: Compressed image found at block 0 Freeing initrd memory: 994k freed. VFS: Mounted root (ext2 filesystem). Mounted devfs on /dev vgscan -- found inactive volume group "vg3" vgscan -- ERROR 28 writing volumegroup backup file /etc/lvmtab.d/vg3.tmp in vg_cfgbackup.c [line273] vgscan -- ERROR: "lvm_tab_vg_remove(): unlink" removing volume group "vg3" from "/etc/lvmtab.d" vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" succesfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume group 

vgchange -- no volume groups found

VFS: Cannot open root device "vg3/rootlv" or 00:00 Please append a correct "root=" boot option Kernel panic: VFS: Unable to mount rootfs on 00:00

Now, the strange thing is, when I boot via the CD and do vgscan and vgchange -ay by hand, I can mount /dev/vg3/rootlv normally!

Does anybody got any ideas? I've run out of them

Thanks for any help in advance. When you need any more info, just say so.

Regards, Patrick

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#3 lore raw
In reply to Patrick van den Berg

check your rc.sysinit script for the lvm section mine had a check for /proc/lvm before it did vgchange portion which doesn't exist until you do a vgchange --- Patrick van den Berg <[email protected]>

Quoted 106 lines · wrote:

Hello everybody,

I'm new at using LVM and I ran into trouble using it. I've got problems
mounting an LVM volume as root on my system running Gentoo Linux 1.4. My
configuration is as follows (skip to the bottom of the text for the actual
error message):

Gigabyte mainboard with onboard Promise RAID. I've got 2 80GB discs attached
(same model) and configured as RAID1. I installed via the Gentoo RC1 Stage 1
CDROM. During boot of the CD I had to abort and add the "IDE0=0x9400,0x9802
IDE2=0x9c00,0xa002" parameters to be able to load the pdcraid module.

My fstab looks as follows:

/dev/ataraid/disc0/part1 /boot ext3
noauto,noatime 1 1
/dev/vg3/rootlv / reiserfs
noatime 0 0
/dev/ataraid/disc0/part2 none swap sw

           0  0 

/dev/cdroms/cdrom0 /mnt/cdrom iso9660
noauto,ro 0 0
proc /proc proc
defaults 0 0
tmpfs /dev/shm tmpfs
defaults 0 0

I also compiled my kernel using the gentoo-sources, and with the following
options enabled:

- LVM support
- Built-in RAM disk support with initrd
- DEV fs support
- mount DEV filesystem at boot
- ReiserFS support

I also ran lvmcreate_initrd with the -M option,
because everything is compiled
in the kernel. Also, when I run lvmceate_initrd
without the -M options, it
returns errors and the lvm image is not created.

My grub,conf (linked to menu.lst) looks as follows:

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo 1.4 GNU/Linux on Antigone
root (hd0,0)
kernel /boot/bzImage root=/dev/vg3/rootlv
ide0=0x9400,0x9802 ide2=0x9c00,0xa002
initrd /boot/initrd-lvm.gz

When I boot the system grub starts correctly, but
when grub wants to boot my
system the following messages appear:

Code: 

RAMDISK: Compressed image found at block 0 Freeing initrd memory: 994k freed.
VFS: Mounted root (ext2 filesystem). Mounted devfs on /dev
vgscan -- found inactive volume group "vg3" vgscan -- ERROR 28 writing volumegroup backup file /etc/lvmtab.d/vg3.tmp in
vg_cfgbackup.c [line273]
vgscan -- ERROR: "lvm_tab_vg_remove(): unlink" removing volume group "vg3"
from "/etc/lvmtab.d"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" succesfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume group

vgchange -- no volume groups found

VFS: Cannot open root device "vg3/rootlv" or 00:00 Please append a correct "root=" boot option

Kernel panic: VFS: Unable to mount rootfs on 00:00 

Now, the strange thing is, when I boot via the CD
and do vgscan and
vgchange -ay by hand, I can mount /dev/vg3/rootlv
normally!

Does anybody got any ideas? I've run out of them

Thanks for any help in advance. When you need any
more info, just say so.

Regards,
Patrick

Quoted 5 lines

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at

http://tldp.org/HOWTO/LVM-HOWTO/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

#4 lore raw
In reply to Patrick van den Berg
Quoted 2 lines

Does anybody got any ideas? I've run out of them

<brokenrecord iter=1073741824>

Take your root volume off of LVM. If there is any problem with the system then you cannot fix it if the root volume is inaccessable. The simplest fix is to leave /boot on your root volume and push /usr and /var onto their own LV's (along with /home, /opt or /usr/local, some scratch space and /home). The point is to make sure that there is enough of a system avaiable that you can boot single-user if LVM is cooked and fix the problem. If you are stuck booting off of a CD then you don't really know what the problem is or what it looks like at boot time.

In my own case I use tmpfs for /tmp, 2GB for /scratch, have a rather small /home and large /sandbox (where things managed through CVS live).

</brokenrecord>

You might want to poke around in the rc.sysint (whatever the dist uses for it) and convince yourself that vgchange is happening after devfsd is started up.

If your root is off of LVM then you can put something like:

	/bin/grep 'single' /proc/cmdline && exit 0;

near the top of your rc.sysinit (whatever) file -- obviously after mouting /proc -- which is after / has been fsck-ed. Depending on how high you put this it allows you to walk down the startup process and see what environment the startup file is living in. If you don't like "single" as the word then try "foobar" or "kwitit". After the system has left itself in low-level mode you can step through the rc.sysinit by cut+paste or simply checking the commands by hand yourself.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                           +1 800 762 1582
#2 lore raw
In reply to Francis SOUYRI

I'm sorry for this *very* late reply to my original post almost 3 weeks ago (original post is pasted below). I put the problem down for a while because I had some other things to do. I now have found the problem, and it wasn't LVM related at all. My kernel incorrectly detected my onboard Promise RAID controller (PCI cards should work fine though), and thus couldn't find the vg. I've now configured my onboard RAID controller to behave like an extra ATA-100 controller, and have installed software raid. I now run LVM on top of software RAID; I have excluded / from LVM though, just to be sure.

Thanks to Francis SOUYRI, Pierre Lamb and Steven Lembark for their suggestions.

Regards,
Patrick van den Berg

Quoted 36 lines

Hello everybody,

I'm new at using LVM and I ran into trouble using it. I've got problems mounting an LVM volume as root on my system running Gentoo Linux 1.4. My configuration is as follows (skip to the bottom of the text for the actual error message):

Gigabyte mainboard with onboard Promise RAID. I've got 2 80GB discs attached (same model) and configured as RAID1. I installed via the Gentoo RC1 Stage 1 CDROM. During boot of the CD I had to abort and add the "IDE0=0x9400,0x9802 IDE2=0x9c00,0xa002" parameters to be able to load the pdcraid module.

My fstab looks as follows:

/dev/ataraid/disc0/part1  /boot       ext3      noauto,noatime  1  1 
/dev/vg3/rootlv           /           reiserfs  noatime         0  0 
/dev/ataraid/disc0/part2  none        swap      sw              0  0 
/dev/cdroms/cdrom0        /mnt/cdrom  iso9660   noauto,ro       0  0 
proc                      /proc       proc      defaults        0  0 
tmpfs                     /dev/shm    tmpfs     defaults        0  0 

I also compiled my kernel using the gentoo-sources, and with the following options enabled:

- LVM support
- Built-in RAM disk support with initrd
- DEV fs support
- mount DEV filesystem at boot
- ReiserFS support

I also ran lvmcreate_initrd with the -M option, because everything is compiled in the kernel. Also, when I run lvmceate_initrd without the -M options, it returns errors and the lvm image is not created.

My grub,conf (linked to menu.lst) looks as follows:

Quoted 7 lines

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo 1.4 GNU/Linux on Antigone
root (hd0,0)
kernel /boot/bzImage root=/dev/vg3/rootlv ide0=0x9400,0x9802

ide2=0x9c00,0xa002

Quoted 43 lines

initrd /boot/initrd-lvm.gz

When I boot the system grub starts correctly, but when grub wants to boot my system the following messages appear:

Code: 

RAMDISK: Compressed image found at block 0
Freeing initrd memory: 994k freed.
VFS: Mounted root (ext2 filesystem).
Mounted devfs on /dev
vgscan -- found inactive volume group "vg3"
vgscan -- ERROR 28 writing volumegroup backup file /etc/lvmtab.d/vg3.tmp in vg_cfgbackup.c [line273]
vgscan -- ERROR: "lvm_tab_vg_remove(): unlink" removing volume group "vg3" from "/etc/lvmtab.d"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" succesfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume group

vgchange -- no volume groups found

VFS: Cannot open root device "vg3/rootlv" or 00:00 Please append a correct "root=" boot option

Kernel panic: VFS: Unable to mount rootfs on 00:00 

Now, the strange thing is, when I boot via the CD and do vgscan and vgchange -ay by hand, I can mount /dev/vg3/rootlv normally!

Does anybody got any ideas? I've run out of them

Thanks for any help in advance. When you need any more info, just say so.

Regards,
Patrick

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/