• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS/RHEL: Mount Command Fails With “mount: does not contain SELinux labels”

by admin

The Problem

Getting below error message when trying to mount a filesystem:

# mount /dev/mapper/vg-lv /mnt
mount: /mnt does not contain SELinux labels.
     You just mounted an file system that supports labels which does not
     contain labels, onto an SELinux box. It is likely that confined
     applications will generate AVC messages and not be allowed access to
     this file system. For more details see restorecon(8) and mount(8).
mount: /dev/mapper/vg-lv mounted on /mnt.

Even though the output shows the device was mounted, it was actually not, which can be confirmed with commands such as df or mount.

The Solution

The partition’s SELinux context is incorrect. The correct context needs to be set in order to be able to mount the partition.

Relabel the filesystem by creating /.autorelabel followed by a reboot or perform restorecon on the filesystem:

# touch /.autorelabel
# reboot

or

# restorecon -Rv /

Filed Under: Linux

Some more articles you might also be interested in …

  1. getent Command Examples in Linux
  2. How to run “find” command on current directory only and not on sub-directories
  3. git bug: A distributed bug tracker that uses git’s internal storage, so no files are added in your project
  4. How to Setup SSH keys for “passwordless” SSH Login on CentOS/RHEL
  5. home-manager Command Examples
  6. scsi_id Command Examples in Linux
  7. gem: Interact with the package manager for the Ruby programming language
  8. pw-record Command Examples in Linux
  9. Beginners Guide to yum Configuration
  10. update-rc.d: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright