Bug 77539 - lvm initialization fails at /etc/rc.d/rc.sysinit line 310.
Summary: lvm initialization fails at /etc/rc.d/rc.sysinit line 310.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: lvm
Version: 8.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Stephen Tweedie
QA Contact: Brian Brock
: 79018 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2002-11-08 19:22 UTC by Dan
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-11-13 20:40:28 UTC

Attachments (Terms of Use)

Description Dan 2002-11-08 19:22:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
I set up a logical volume, tested it by mounting it with the mount command and 
doing a df, so no problems there. The problem is that the test at line 310:
 if [ -e /proc/lvm -a -x /sbin/vgchange -a -e /etc/lvmtab ]
fails, leading to the system not booting the rest of the way and going into a 
failsafe prompt environment, even though those files exist. When I commented 
out that line (and the fi command at line 312) everything worked fine. The 
problem is with the test.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.create an logical volume
2.add it to /etc/fstab

Actual Results:  system went into a maintenance shell

Expected Results:  system should have booted happily

Additional info:

Comment 1 Stephen Tweedie 2002-11-11 17:31:38 UTC
You probably need to re-run "mkinitrd".  Kernel modules needed at boot time get
loaded along with the initial kernel image, and the installer sets all that up
so that the initrd includes the lvm.o module if needed.  Please reopen the bug
if that doesn't get things going.

Comment 2 Dan 2002-11-13 20:32:07 UTC
The lvm problem--really it is not a problem with lvm itself, which works fine, 
but I was not able to determine where else to report this--is with the 
rc.sysinit file. When I start lvm manually--vgscan, vgchange -a y, and so on--
it works fine, no module errors or anything. The fix is easy: remove the 
-e /proc/lvm part of the test on line 310 of rc.sysinit. After that is done, 
all works fine. This leads me to believe that the proc filesystem is not 
testable at this stage of loading, thus the error. This error also occurs if 
lvm is set up during the installation.

Comment 3 Stephen Tweedie 2002-11-13 21:29:15 UTC
The rules in Red Hat Linux are simple --- the initscripts only set up the LVM
volumes if the kernel has been set up with LVM configured.  That's NOT a bug,
it's simply the design of the initscripts.

And you *need* to rerun mkinitrd AND (unless you're using grub) lilo if you
enable LVM after the initial setup.  Otherwise, the initial kernel boot won't
load with the LVM modules, and the init scripts won't see /proc/lvm present, and
you won't get the volumes initialised.

I have many systems here using LVM perfectly happily using this.  The existing
8.0 rc.sysinit works with this scheme just fine --- IF you enable LVM in your
kernel boot (via the initrd).

If you have a reproducible case where setting up LVM in the initial install
doesn't result in LVM being enabled at run time, then please file that bug
against the installer ("anaconda").

Comment 4 Stephen Tweedie 2002-12-06 23:39:12 UTC
*** Bug 79018 has been marked as a duplicate of this bug. ***

Comment 5 Dax Kelson 2003-04-15 17:41:32 UTC
Incidentally, this is NOT a problem (not having the LVM kernel moduled
loaded in the initial ram disk) in Red Hat Linux 9.

Red Hat Linux 9's rc.sysinit file will load the LVM kernel module if the
initial ram disk didn't. Here is the relevant portion.

# LVM initialization
if [ -f /etc/lvmtab -a ! -e /proc/lvm ] ; then
        modprobe lvm-mod >/dev/null 2>&1
if [ -e /proc/lvm -a -x /sbin/vgchange -a -f /etc/lvmtab ]; then
        action $"Setting up Logical Volume Management:" /sbin/vgscan &&
/sbin/vgchange -a y

Note You need to log in before you can comment on or make changes to this bug.