Skip to contentSkip to conversation

cannot mount logical volume on boot

linux-lvm Ben Snyder 2 participants 3 messages Sep 17, 2002

lore
Share & tools
lore

Ben Snyder

author
#0 lore raw

OK, this has me stumped. My server isnt mounting the logical volume on boot time, in fact booting fails. I've had to hardlink /dev/vg/lv to /dev/sdz1 because some of the software I use does some assinine tests of the /etc/fstab and checks mount points etc and /dev/vg/lv is 'too long' according to the vendor. The software in question works fine with the hardlink, but LVM is ticked at me for some reason.

In my /etc/rc.d/rc.sysinit, right before the script calls for a mount of local file systems, there's segment like so:
if [ -x /sbin/vgscan ]; then
action "Installing LVM module" /sbin/modprobe lvm-mod #this line
added by me
action "Initializing LVM" /sbin/vgscan
action "Activating volumn groups" /sbin/vgchange
fi

I added the modprobe, because I was seeing messages when vgscan ran like 'module not loaded?'.

OK, now on to the meat of my problem. If I comment out the filesystem in /etc/fstab, everything is fine (except my software). I log in, the lvm module is loaded, the volume group is active and ready for use and I can mount it up no problem. If I uncomment that line and reboot, everything fails and I get to the single-user mode root password prompt.
Enter root's passwd, comment the line in /etc/fstab, logout/reboot and
everything is fine (except the FS isnt mounted).

I cant really put the mount in rc.local or anything like that, as the above mentioned 3rd party software requires the filesystem to be mounted when it tries to start (which is managed through standard start scripts).

System details:
RedHat 6.2 running kernel 2.2.19-6.2.16
The LVM spans 2 7200RPM Seagate Cheetah SCSI drives(identical)

Thanks in advance for answer/feedback.

#1 lore raw
Quoted 2 lines · On Tue, 17 Sep 2002, at 4:18pm, [email protected] wrote:

If I uncomment that line and reboot, everything fails and I get to the single-user mode root password prompt.

It sounds like the LVM is not up and running properly with the LV
available when the filesystem check is run, causing the fsck to fail, causing the initscripts to drop you into the emergency "your system is really hosed" shell at boot.

Quoted 1 line

I've had to hardlink /dev/vg/lv to /dev/sdz1

Instead of a hardlink, try a symlink. I suspect the hardlink is causing
the device node magic in the LVM userland programs to get all borked up.

Signature · 4 lines
Ben Scott <[email protected]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |
author
#2 lore raw
Quoted 6 lines · [email protected] wrote:

It sounds like the LVM is not up and running properly with the LV
available when the filesystem check is run, causing the fsck to fail, causing the initscripts to drop you into the emergency "your system is really hosed" shell at boot.

Yeah, just trying to figure out why, excatly.

Quoted 6 lines

Instead of a hardlink, try a symlink. I suspect the hardlink is causing
the device node magic in the LVM userland programs to get all borked up.

After reading your suggestion I thought I'd give that a shot...what I get is a message telling me /dev/sdz1 is not a valid block device.