Bug 126192 - after install, lvm2 volumes are not activated if selinux is enabled and /var is on a separate partition
after install, lvm2 volumes are not activated if selinux is enabled and /var ...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-17 06:00 EDT by Radu Greab
Modified: 2014-03-16 22:46 EDT (History)
1 user (show)

See Also:
Fixed In Version: 7.58-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-29 00:34:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Radu Greab 2004-06-17 06:00:41 EDT
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 06:02:48 EDT
Created attachment 101211 [details]
with this patch the system boots successfully
Comment 2 Radu Greab 2004-06-17 06:08:49 EDT
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 00:34:49 EDT
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.