Bug 134102 - LVM fails to execute vgchange -a y in rc.sysinit
LVM fails to execute vgchange -a y in rc.sysinit
Status: CLOSED DUPLICATE of bug 132870
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Depends On:
  Show dependency treegraph
Reported: 2004-09-29 12:46 EDT by Al Tobey
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-29 12:55:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Al Tobey 2004-09-29 12:46:05 EDT
Description of problem:
On the first boot of a freshly installed laptop with RHEL4b1,
filesystems could not be mounted because rc.sysinit didn't execute
vgchange -a y.   Copying the line that's supposed to do this to just
after the if/fi block for LVM2 makes everything work.   I'm guessing
LVM was looking at my DVD drive or something like that.

Instead of using vgscan's return value (which can fail due to cdroms
and floppy drives returning errors), maybe use this:

if lvm.static vgchange -t -a y --ignorelockingfailure >/dev/null 2>&1
   action "blah blah" lvm.static vgchange -a y --ignorelockingfailure

Here's what the filesystem layout looks like:
[root@linuxws1 tmp]# df -hP
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2             479M  342M  113M  76% /
none                  252M     0  252M   0% /dev/shm
/dev/mapper/vgroot-lv_home  9.7G  4.4G  4.8G  48% /home
/dev/mapper/vgroot-lv_opt  993M  140M  803M  15% /opt
/dev/mapper/vgroot-lv_ora  496M   11M  460M   3% /ora
/dev/mapper/vgroot-lv_tmp  496M   27M  444M   6% /tmp
/dev/mapper/vgroot-lv_usr  4.9G  2.9G  1.7G  64% /usr
/dev/mapper/vgroot-lv_usrlocal  496M   11M  460M   3% /usr/local
/dev/mapper/vgroot-lv_var  993M  149M  794M  16% /var

Here is the modified portion of rc.sysinit:
# LVM2 initialization
if [ -x /sbin/lvm.static ]; then
    if ! LC_ALL=C fgrep -q "device-mapper" /proc/devices 2>/dev/null ;
    modprobe dm-mod >/dev/null 2>&1
    echo "mkdmnod" | /sbin/nash --quiet >/dev/null 2>&1
    [ -n "$SELINUX" ] && restorecon /dev/mapper/control >/dev/null 2>&1
    if [ -c /dev/mapper/control -a -x /sbin/lvm.static ]; then
    if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure >
/dev/null 2>&1 ; then
        action $"Setting up Logical Volume Management:"
/sbin/lvm.static vgchange -a y --ignorelockingfailure

# execute vgchange -a y no matter what because it isn't working
# for some reason (-tobeya)
        action $"Setting up Logical Volume Management:"
/sbin/lvm.static vgchange -a y --ignorelockingfailure
# LVM initialization
Comment 1 Alasdair Kergon 2004-09-29 12:53:26 EDT
Should be fixed in 2.00.25-1.
Comment 2 Alasdair Kergon 2004-09-29 12:54:50 EDT

*** This bug has been marked as a duplicate of 132870 ***

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