Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 55460 - rc.sysinit doesn't work right with LVM + RAID
rc.sysinit doesn't work right with LVM + RAID
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-10-31 12:12 EST by Daniel Wittenberg
Modified: 2014-03-16 22:24 EDT (History)
4 users (show)

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

Attachments (Terms of Use)
initscripts-casts.patch (2.05 KB, patch)
2002-03-01 18:13 EST, Andreas Piesk
no flags Details | Diff
initscripts-halt-lvm.patch (410 bytes, patch)
2002-03-01 18:14 EST, Andreas Piesk
no flags Details | Diff
initscripts-rc.sysinit-lvm.patch (649 bytes, patch)
2002-03-01 18:15 EST, Andreas Piesk
no flags Details | Diff

  None (edit)
Description Daniel Wittenberg 2001-10-31 12:12:04 EST
Description of Problem:
If you have an LVM configuration on top of software RAID, the 
rc.sysinit script will fail because it tries to setup LVM before 
RAID, which will obviously fail.  The worst part is that if 
vgscan doesn't find the vgda, it will wipe your LVM config info 
(/etc/lvmtab and /etc/lvmtab.d/*).  

Version-Release number of selected component (if 
Red Hat 7.2 init scripts, rc.sysinit specifically

How Reproducible:
Setup LVM on top of a software RAID device

Steps to Reproduce:

Actual Results:

Expected Results:
LVM should be configured _after_ RAID configuration in the 

Additional Information:
Comment 1 Charles Lopes 2001-12-03 11:52:34 EST
Further both should be moved much earlier in the file before turning on the swap.
That way a RAID array or LVM volume can be used for swap.
Comment 2 Andreas Piesk 2002-03-01 18:12:37 EST
lvm initialization fails if lvm was built as module, because /proc/lvm does
not exist if module isn't loaded. another (dangerous) thing is calling vgscan 
at every bootup. vgscan will first remove /etc/{lvmtab,lvmtab.d} and create new 
files afterwards. the files are containing the volume group layout. if vgscans 
fails for whatever reason, your setup is lost. see file initscripts-rc.sysinit-

the volume groups should be deacticated in /etc/rc.d/init.d/halt. see file 

last but not least i fixed some compilerwarning (type cast). see file 
Comment 3 Andreas Piesk 2002-03-01 18:13:55 EST
Created attachment 47164 [details]
Comment 4 Andreas Piesk 2002-03-01 18:14:34 EST
Created attachment 47165 [details]
Comment 5 Andreas Piesk 2002-03-01 18:15:20 EST
Created attachment 47166 [details]
Comment 6 Need Real Name 2002-09-10 07:25:11 EDT
I think that the attached rc.sysinit (id=47166) is not correct:
-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
+if [ -f /lib/modules/$(uname -r)/kernel/drivers/md/lvm-mod.o -o -e /proc/lvm ] 
&& \
+   [ -x /sbin/vgchange -a -f /etc/lvmtab ]; then
+        action $"Setting up Logical Volume Management:" /sbin/vgchange -a y

I think the right is:
-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
+if [ -f /lib/modules/$(uname -r)/kernel/drivers/md/lvm-mod.o -o -e /proc/lvm ] 
&& \
+   [ -x /sbin/vgchange -a -f /etc/lvmtab ]; then
+        action $"Setting up Logical Volume Management:" /sbin/vgchange -a y
+ fi
Comment 7 Bill Nottingham 2002-10-21 12:54:16 EDT
All the LVM code should be OK in current initscripts. Talking to the LVM gurus
here; they state that the shutdown isn't really necessary.

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