Project

General

Profile

Bug #17331

ceph-disk list reports mount error for OSD having mount options with SELinux context

Added by Vikhyat Umrao about 1 year ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
09/20/2016
Due date:
% Done:

0%

Source:
Support
Tags:
Backport:
hammer,jewel,kraken
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
master
Needs Doc:
No

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.

Related issues

Copied to Ceph - Backport #19535: hammer: ceph-disk list reports mount error for OSD having mount options with SELinux context Rejected
Copied to Ceph - Backport #19536: jewel: ceph-disk list reports mount error for OSD having mount options with SELinux context Resolved
Copied to Ceph - Backport #19537: kraken: ceph-disk list reports mount error for OSD having mount options with SELinux context Resolved

History

#1 Updated by Vikhyat Umrao about 1 year ago

  • Description updated (diff)

#2 Updated by Vikhyat Umrao about 1 year ago

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)

#3 Updated by Brad Hubbard about 1 year ago

  • Assignee set to Brad Hubbard

#4 Updated by Brad Hubbard about 1 year ago

  • Needs Doc set to No

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
...

#5 Updated by Brad Hubbard 8 months ago

  • Status changed from New to In Progress

#6 Updated by Brad Hubbard 8 months ago

  • Release master added
  • Release deleted (hammer)

#8 Updated by Brad Hubbard 8 months ago

  • Status changed from In Progress to Pending Backport
  • Backport set to hammer,jewel,kraken

#9 Updated by Nathan Cutler 8 months ago

  • Copied to Backport #19535: hammer: ceph-disk list reports mount error for OSD having mount options with SELinux context added

#10 Updated by Nathan Cutler 8 months ago

  • Copied to Backport #19536: jewel: ceph-disk list reports mount error for OSD having mount options with SELinux context added

#11 Updated by Nathan Cutler 8 months ago

  • Copied to Backport #19537: kraken: ceph-disk list reports mount error for OSD having mount options with SELinux context added

#12 Updated by Nathan Cutler 3 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF