Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Support
Tags:
Backport:
hammer,jewel,kraken
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 3 (0 open3 closed)

Copied to Ceph - Backport #19535: hammer: ceph-disk list reports mount error for OSD having mount options with SELinux contextRejectedActions
Copied to Ceph - Backport #19536: jewel: ceph-disk list reports mount error for OSD having mount options with SELinux contextResolvedShinobu KinjoActions
Copied to Ceph - Backport #19537: kraken: ceph-disk list reports mount error for OSD having mount options with SELinux contextResolvedShinobu KinjoActions
Actions #1

Updated by Vikhyat Umrao over 7 years ago

  • Description updated (diff)
Actions #2

Updated by Vikhyat Umrao over 7 years 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)
Actions #3

Updated by Brad Hubbard over 7 years ago

  • Assignee set to Brad Hubbard
Actions #4

Updated by Brad Hubbard over 7 years ago

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
...
Actions #5

Updated by Brad Hubbard about 7 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Brad Hubbard about 7 years ago

  • Release deleted (hammer)
  • Release set to master
Actions #8

Updated by Brad Hubbard about 7 years ago

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

Updated by Nathan Cutler about 7 years ago

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

Updated by Nathan Cutler about 7 years ago

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

Updated by Nathan Cutler about 7 years ago

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

Updated by Nathan Cutler over 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF