GNU/Linux >> Linux の 問題 >  >> Linux

CentOS/RHEL:マウント コマンドが「mount:does not contain SELinux labels」で失敗する

問題

ファイルシステムをマウントしようとすると、以下のエラー メッセージが表示されます:

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

出力はデバイスがマウントされていることを示していますが、実際にはマウントされていません。これは、df や mount などのコマンドで確認できます。

解決策

パーティションの SELinux コンテキストが正しくありません。パーティションをマウントできるようにするには、正しいコンテキストを設定する必要があります。

/.autorelabel を作成して、ファイルシステムのラベルを変更します その後、再起動するか、ファイルシステムで restorecon を実行します:

# touch /.autorelabel
# reboot

または

# restorecon -Rv /


Linux
  1. BashスクリプトのRmコマンドは変数では機能しませんか?

  2. ifconfig コマンドが見つからない – CentOS/RHEL 7

  3. 「lsb_release:command not found」 – CentOS/RHEL で修正

  1. CentOS / RHEL :pvmove コマンドを使用してストレージ (LVM) を移行する方法

  2. CentOS/RHEL で同じ名前の 2 つのボリューム グループをアクティブ化してマウントする方法

  3. mount.cifs:コマンドが見つかりません

  1. CentOS/RHEL 7 で「別のアプリが現在 yum ロックを保持しています」というメッセージが表示されて Yum コマンドが失敗する

  2. CentOS/RHEL:マウント コマンドが「mount:does not contain SELinux labels」で失敗する

  3. losetup:コマンドが見つかりません