Bug #17331
closed
ceph-disk list reports mount error for OSD having mount options with SELinux context
Added by Vikhyat Umrao over 7 years ago.
Updated over 6 years ago.
Backport:
hammer,jewel,kraken
Description
ceph-disk list reports mount error for OSD having mount options with SELinux context
osd_mount_options_xfs = "rw,noatime,logbsize=262144,logbufs=8,inode64,context=unconfined_u:object_r:var_lib_t:s0"
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
- Description updated (diff)
We do have below given message in /var/log/messages when we see this issue in command line while running 'ceph-disk list':
kernel: SELinux: mount invalid. Same superblock, different security settings for (dev sdc1, type xfs)
- Assignee set to Brad Hubbard
A minimal reproducer using a dev cluster. Make sure selinux is enforcing.
# dd if=/dev/zero of=/tmp/dummyhdd bs=1M count=1536
# losetup /dev/loop0 /tmp/dummyhdd
# parted /dev/loop0 mklabel gpt
# parted /dev/loop0 mkpart primary 1 1000
# parted -s /dev/loop0 mkpart primary 1001 1500
# sgdisk --typecode=1:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -- /dev/loop0
# partprobe
# MON=1 MDS=0 OSD=0 ../src/vstart.sh -n -l
# mkdir dev/osd0
# echo osd_journal_size = 500 >> ceph.conf
# bin/ceph osd create b367c360-b364-4b1d-8fc6-09408a9cda7a //should return "0" for osd0
# mkfs.xfs /dev/loop0p1
# mount -o noatime,context=unconfined_u:object_r:var_lib_t:s0 /dev/loop0p1 dev/osd0/
# bin/ceph-osd -i 0 --mkfs --mkkey --osd-uuid b367c360-b364-4b1d-8fc6-09408a9cda7a
# PATH=$PATH:./bin/ src/ceph-disk/ceph_disk/main.py --sysconfdir . list
mount: wrong fs type, bad option, bad superblock on /dev/loop0p1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
/dev/dm-0 other, xfs, mounted on /
/dev/dm-1 swap, swap
/dev/loop0 :
/dev/loop0p1 ceph data, active, cluster ceph, osd.0
/dev/loop0p2 other, 0fc63daf-8483-4772-8e79-3d69d8477de4
...
- Status changed from New to In Progress
- Release deleted (
hammer)
- Release set to master
- Status changed from In Progress to Pending Backport
- Backport set to hammer,jewel,kraken
- Copied to Backport #19535: hammer: ceph-disk list reports mount error for OSD having mount options with SELinux context added
- Copied to Backport #19536: jewel: ceph-disk list reports mount error for OSD having mount options with SELinux context added
- Copied to Backport #19537: kraken: ceph-disk list reports mount error for OSD having mount options with SELinux context added
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF