Bug 126192 - after install, lvm2 volumes are not activated if selinux is enabled and /var is on a separate partition
Summary: after install, lvm2 volumes are not activated if selinux is enabled and /var ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-17 10:00 UTC by Radu Greab
Modified: 2014-03-17 02:46 UTC (History)
1 user (show)

Fixed In Version: 7.58-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-29 04:34:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
with this patch the system boots successfully (1.23 KB, patch)
2004-06-17 10:02 UTC, Radu Greab
no flags Details | Diff

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.


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