Description of problem: When I run 'pvcreate /dev/mapper/sdd7_[01]' (which are multipath aliases for / dev/mapper/dm-[34], respectively), I see this in /var/log/messages: Sep 14 12:58:32 venom setroubleshoot: SELinux is preventing /usr/sbin/lvm (lvm_t) "write" to .cache (lvm_etc_t). For complete SELinux messages. run sealert -l a4364cd2-25ef-4851-9e81-8760a8e3d9a4 I ran the sealert command specified above and it told me to try running this command: restorecon -v .cache which failed with the message: lstat(.cache) failed: No such file or directory Version-Release number of selected component (if applicable): lvm2-2.02.16-3.el5 device-mapper-1.02.13-1.el5 device-mapper-multipath-0.4.7-8.el5 How reproducible: Consistent. I did 'dd if=/dev/zero of=/dev/mapper/<device> bs=1024 count=1' to each device, then re-run pvcreate and I get the same message. Steps to Reproduce: 1. pvcreate /dev/mapper/<devicename> 2. 3. Actual results: Expected results: no SElinux errors Additional info: also happens with vgcreate, vgchange, vgdislpay. Assume it will happen with all the LVM cmds.
restorecon -R -v /etc/lvm Should fix the context, but some app is causing it to be written with the wrong context. Upstream has fixed this problem by moving the cache file to a subdirectory Fedora 7 8 and beyond. /etc/lvm/cache/
There is one of two solutions to this problem. Backport the change from Rawhide that moves /etc/lvm/.cache to /etc/lvm/cache/.cache or just allow lvm to write to any of its config files.
Backport.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
In lvm2-2.02.30-1.el5.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0378.html