Red Hat Bugzilla – Bug 126192
after install, lvm2 volumes are not activated if selinux is enabled and /var is on a separate partition
Last modified: 2014-03-16 22:46:13 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.
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
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):
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
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.
Created attachment 101211 [details]
with this patch the system boots successfully
probably when selinux was enabled by default, talks about the same
- lvm vgscan --mknodes exits with code 5
Although it was resolved, the problem is still present in FC 2.
Added in CVS, will be in 7.58-1.