Clint Dilks
2013-Jun-13 11:49 UTC
[CentOS] Link for Logical Volume has incorrect SE Linux context
Hi A few days ago we rebooted a server and found that one of the Logical Volumes would not mount at boot, but mounted cleanly manually. So I traced the problem to SE Linux. Specifically the context for /dev/mapper/VolGroup01-lv_ staff is wrong. s -lsahZ /dev/mapper/VolGroup01-* lrwxrwxrwx. root root system_u:object_r:quota_db_t:s0 /dev/mapper/VolGroup01-lv_staff -> ../dm-25 lrwxrwxrwx. root root system_u:object_r:device_t:s0 /dev/mapper/VolGroup01-lv_student -> ../dm-24 I have tried to correct this with the Logical Volume active and mounted using chcon -v --reference /dev/mapper/VolGroup01-lv_student /dev/mapper/VolGroup01-lv_staff and while this command completes the context is not changed. Can someone confirm or deny that making the Logical Volume inactive and then repeating the chcon should change the link to the correct context? Thanks for any insight you can offer.
James Hogarth
2013-Jun-13 12:17 UTC
[CentOS] Link for Logical Volume has incorrect SE Linux context
> > Can someone confirm or deny that making the Logical Volume inactive and > then repeating the chcon should change the link to the correct context?First off don't use chcon. What's the output of restorecon -Fvv /path-to-file ? It seems very odd in the first place for anything in /dev to have an incorrect context given it's a virtual filesystem and as such the contexts handled by the kernel... Unless of course someone messing about with chcon broke something...
Possibly Parallel Threads
- quota and selinux on centos 6.5
- interesting kvm lvm collision issue
- Can an ISO be specified allow mount "setsebool -P allow_mount_iso=1" insted of "setsebool -P allow_mount_anyfile=1" SE context samba share
- CentOS-6 SSHD chroot SELinux problem
- Help recovering from an LVM issue