GNU/Linux >> Linux Esercitazione >  >> Linux

CentOS/RHEL:il comando di montaggio non riesce con "mount:non contiene etichette SELinux"

Il problema

Ottenere sotto il messaggio di errore quando si tenta di montare un 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.

Anche se l'output mostra che il dispositivo è stato montato, in realtà non lo era, il che può essere confermato con comandi come df o mount.

La soluzione

Il contesto SELinux della partizione non è corretto. È necessario impostare il contesto corretto per poter montare la partizione.

Rietichetta il filesystem creando /.autorelabel seguito da un riavvio o eseguire un ripristinocon sul filesystem:

# touch /.autorelabel
# reboot

o

# restorecon -Rv /


Linux
  1. Il comando Yum non riesce con "Un'altra app sta attualmente tenendo il blocco yum" in CentOS/RHEL 7

  2. "lsb_release:comando non trovato" – Correzione in CentOS/RHEL

  3. "-bash:route:comando non trovato" su CentOS/RHEL 7

  4. Come risolvere l'errore "-bash:xclock:comando non trovato" in CentOS / RHEL

  5. mount.cifs:comando non trovato

Come avviare il servizio all'avvio con RHEL 8 / CentOS 8 Linux

comando semanage non trovato in CentOS 8 / RHEL 8

netstat Comando non trovato su CentOS 8 / RHEL 8 – Correzione rapida

ifconfig Comando non trovato su CentOS 8 / RHEL 8 – Correzione rapida

sestatus:comando non trovato

Comando di montaggio Linux con esempi