Bug 126192

Summary: after install, lvm2 volumes are not activated if selinux is enabled and /var is on a separate partition
Product: [Fedora] Fedora Reporter: Radu Greab <radu>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 7.58-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-29 04:34:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
with this patch the system boots successfully none

Description Radu Greab 2004-06-17 10:00:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
If a system with selinux enabled has /var on a separate partition,
then the lvm2 volumes are not activated at the first boot after
install and the system stops at the filesystems checking stage.

From rc.sysinit:
        if /sbin/lvm.static vgscan > /dev/null 2>&1 ; then
            action $"Setting up Logical Volume Management:"
/sbin/lvm.static vgchange -a y && /sbin/lvm vgmknodes
        fi

When the above vgscan is run, only / is mounted and /var is not
mounted. vgscan fails and exits with code 5 because the /var directory
has the wrong context and /var/lock does not exist, preventing this
way the creation of the /var/lock/lvm directory.

One solution could be to tell the lvm2 tools to ignore the locking
failures. With a patched initscripts installed by the kickstart
postinstallation script, the first boot of the system is OK, the
device nodes are created, the logical volumes are activated and the
boot finishes successfully.

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

How reproducible:
Always

Steps to Reproduce:
1. Install a system with selinux enabled, lvm2 volumes, /var on a
separate partition (in my case / and /var are on separate logical
volumes).
2. Reboot at the end of the installation.


Actual Results:  The system stops at the file systems checking stage
because the logical volumes have not been activated.

Expected Results:  The boot process should finish successfully.

Additional info:

Comment 1 Radu Greab 2004-06-17 10:02:48 UTC
Created attachment 101211 [details]
with this patch the system boots successfully

Comment 2 Radu Greab 2004-06-17 10:08:49 UTC
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=119975, created
probably when selinux was enabled by default, talks about the same
problem:
- lvm vgscan --mknodes exits with code 5

Although it was resolved, the problem is still present in FC 2.


Comment 3 Bill Nottingham 2004-06-29 04:34:49 UTC
Added in CVS, will be in 7.58-1.