RH7.3: LVM & /etc/rc.d/rc.sysinit

RH7.3: LVM & /etc/rc.d/rc.sysinit

Post by Daniel E. Webe » Sat, 29 Jun 2002 02:53:54



There appears to be a problem with the way the /etc/rc.d/rc.sysinit file
is checking for the presence of logical volumes during boot under RedHat
7.3. Or, I could be doing something incorrectly in my LVM setup. I post
here for comments and/or feedback.

I have created a logical volume across two disc partitions (separate,
non-striped discs). The volumes are then mounted via /etc/fstab as:
     /dev/internet/ftp   /var/ftp   ext3   defaults   0 2
     /dev/internet/www   /www       ext3   defaults   0 2
The / partition is *non*-LVM, only the two listed above are part of
volume groups.

These logical volumes work fine after manually running vgscan, vgcheck
-a y, and mount. But during boot up this fails, right when the system
tries to fsck the filesystems. Apparently the volume groups are not
being activated.

Looking in /etc/rc.d/rc.sysinit there are two sections that attempt to
start the vgscan and vgcheck, but neither section makes it past the
conditional. The original lines are in sysinit twice and appear as:

     # LVM initialization
     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

The evaluation of the statement "-e /proc/lvm" is what seems to be
causing the problem. Removing that from the conditional - leaving only
the check for vgchange and lvmtab - causes the system to scan for the
volume groups correctly, run the fsck.ext3, and boot as normal.

Why is this a problem? Obviously /proc/lvm *does* exist since the /proc
filesystem is supposedly mounted by this point, yet it does not appear
to be found at all during the boot. Except for the change to remove the
conditional, the sysinit file is exactly as installed off the 7.3 discs.

Is this a known problem, or am I doing something incorrectly?

Thank you,
-Daniel Weber

 
 
 

1. difference between /etc/rc.sysinit and /etc/rc.d/rc.sysinit ?

What is the difference between /etc/rc.sysinit and /etc/rc.d/rc.sysinit?
I am using Redhat 8. I did a diff on them and they are identical.
/etc/rc.sysinit is apparently a copy of /etc/rc.d/rc.sysinit since it
says that it is that file, even though it's not (see below).


#!/bin/bash
#
# /etc/rc.d/rc.sysinit - run once at boot time

I want to change something in whichever of these scripts is run at
bootup, but I don't know which one gets run.

Thanks,
Russell

2. Boot log file ?

3. which user does /etc/rc.d/rc.local / rc.sysinit run as?

4. Beginner

5. /etc/rc.d/rc.sysinit: /etc/sysconfig/keyboard: No such file or directory

6. 2.4.20-preX-acX block device question

7. Trouble with /etc/rc.d/rc.sysinit root mount

8. (bug?) Discrepancy between X vidmode and monitor display

9. call to ldconfig in /etc/rc.d/rc.sysinit question

10. /etc/rc.d/rc.sysinit: /proc/sys/kernel/sysrq: No such file or directory

11. rc.local and rc.sysinit don't execute mount

12. /etc/rc: sendmail parms don't match /etc/rc.conf

13. SOLVED - Raid rc.0, rc.6 rc.S