Bug 57563 - rc.sysinit fails to activate LVM
rc.sysinit fails to activate LVM
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 65280 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-15 16:33 EST by Frode Tennebø
Modified: 2014-03-16 22:24 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-21 21:15:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to load lvm-mod before initilising volume groups. (842 bytes, patch)
2002-07-21 21:14 EDT, Matthew Melvin
no flags Details | Diff

  None (edit)
Description Frode Tennebø 2001-12-15 16:33:48 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.9-13custom i686)

Description of problem:
I have set up LVM which works nicely manually. When I reboot it appears
that lvm is not present in /proc which results in vgscan and vgchange not
being run due to:

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
fi




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


How reproducible:
Always

Steps to Reproduce:
1. Set up LVM
2. Add to /etc/fstab
3. reboot
	

Additional info:

I'm not entirely sure that above steps are enough to reproduce the problem
since I actually haven't rebooted earlier after setting up LVM. What
initated this reboot was my 1 year old daughter hitting the power-off
button which resulted in the ext3-filesystem being marked as dirty and
hence I initated an integrity check on them. This might have had something
to do with it....
Comment 1 Frode Tennebø 2002-01-18 18:01:23 EST
I trust the holiday was good. What gives? :)
Comment 2 Bill Nottingham 2002-02-06 22:35:32 EST
Is this reproducible? Do you never have LVM in /proc?

Do you have it compiled as a module, and is it loaded in your initrd?
Comment 3 Frode Tennebø 2002-02-09 17:30:03 EST
Never is a strong word, but yes, I have been able to reproduce this every time
so far.

LVM is compiled as a module, but is not my root partition.

I'm using the RedHat 2.4.9-13 kernel (including initrd setup) but patched with
LVM 1.0.1-rc4.
Comment 4 Bill Nottingham 2002-02-09 21:04:55 EST
OK, what happens if you make your initrd with '--with=lvm-mod'?
Comment 5 Frode Tennebø 2002-02-26 14:02:33 EST
Thank you. This indeed works. However,
1) I was under the impression that /lib/modules/* are used as soon as / is 
mounted rw? And

2) It is not included in 2.4.9-13 kernel while /etc/rc.d/rc.sysinit suggest 
the functionality works.
Comment 6 Jason Tibbitts 2002-04-22 10:27:55 EDT
I'm having essentially the same problem with Skipjack-beta2 (initscripts
6.61-1). However, only my large data partitions are on LVM; my system partitions
are accessible without LVM loaded so there should be no need to put LVM in the
initrd.  If I edit rc.sysinit and add a modprobe lvm-mod in the appropriate
place, things work.  If I instead remove the existence check for /proc/lvm,
things also work.  The presense of /etc/lvmtab, /sbin/vgchange and /sbin/vgscan
should be enough to try activating the volume groups; with module autoloading,
there is no reason to believe that /proc/lvm would exist before this.

Since LVM is now in the kernel and the LVM tools are now included in the
distribution, this should be enough to bump the severity to high (because my
machines won't boot without modifications).
Comment 7 Lindsay Todd 2002-05-09 15:06:27 EDT
I am also seeing this problem, with RedHat 7.3.  I put /home on a logical
partition, and now my system will not boot!

My solution:

    rm -f /boot/initrd-2.4.18-3.img
    mkinitrd --preload lvm-mod /boot/initrd-2.4.18-3.img 2.4.18-3

The preload is essential.

I concur with tibbs@math.uh.edu that this is a severe problem that should be fixed.

Of course, I'd also like to see anaconda support LVM, so I could install and
safely upgrade my system with all my file systems (perhaps sans /boot) and swap
spaces as logical partitions...
Comment 8 Falko Sonne 2002-05-16 08:22:33 EDT
I've got the same problem with RH7.3. /proc/lvm doesn't exist when rc.sysinit 
reaches the LVM initialisation section. When the fstab entries with some lvm's 
are being processed, lvm-mod is loaded into memory and /proc/lvm is created but 
now it's too late.

The solution from toddr@rpi.edu works fine for me too:
   mkinitrd --preload lvm-mod /boot/initrd-2.4.18-3.img 2.4.18-3

Thank you!
Comment 9 Miguel Armas 2002-05-21 06:48:31 EDT
Same problem here, also fixed with an initrd image to load lvm-mod...

Since lvm is compiled as a module, and /proc/lvm doesn't exist until you load
lvm-mod, it doesn't make sense to check for /proc/lvm before initializing LVM.

If rc.sysinit just runs "vgchange -ay", lvm-mod gets loaded automatically and
everything works. No need to create a initrd image...

Comment 10 Eric Hopper 2002-05-30 09:21:25 EDT
This bug is strongly related to Bug# 55460
Comment 11 Bill Nottingham 2002-06-12 03:09:44 EDT
If you do mkinitrd *without* the --preload, does it put LVM in the initrd?
Comment 12 Bill Nottingham 2002-06-12 03:09:55 EDT
*** Bug 65280 has been marked as a duplicate of this bug. ***
Comment 13 Matthew Melvin 2002-07-21 21:14:34 EDT
Created attachment 66204 [details]
patch to load lvm-mod before initilising volume groups.
Comment 14 Matthew Melvin 2002-07-21 21:14:58 EDT
Okay.. so I was bitten by this too. Why can't lvm be like md?  We don't need the
md module in our initrd unless we're using md for our / filesystem.  The same
should hold true for the lvm module. md has a check like...

if [ -f /etc/raidtab ]; then
        # Add raid devices
        [ -f /proc/mdstat ] || modprobe md >/dev/null 2>&1
fi                                                                              

... before it checks for /proc/mdstat and sets up the raid devices.  Why can't
lvm do something similar like...

if [ -f /etc/lvmtab ]; then
        # Add lvm devices
        [ -f /proc/lvm ] || modprobe lmv-mod >/dev/null 2>&1
fi

... with the rest remaining unchanged.  Patch attached.
Comment 15 Bill Nottingham 2002-10-18 16:09:25 EDT
Something like this is in current CVS.
Comment 16 Need Real Name 2002-11-07 09:01:34 EST
The correct work is that you create a new initscript rpm !
Why you close problem without modify initscript? (on rh7.2 errata nothing is
change and in last release rh8.0 the package rpm is not patched)

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