
Ich verwende einen vollständig aktualisierten Ubuntu 9.04 „Jaunty“ i686-Server. Ich habe ein einzelnes XFS-Volume in einer LVM-Gruppe namens /dev/mapper/vg0-bigthree
.
Wenn ich im Einzelbenutzermodus starte und sicherstelle, dass das Volume nicht gemountet ist, erhalte ich bei jedem Versuch, xfs_check auszuführen, immer noch Folgendes:
$ sudo xfs_check /dev/mapper/vg0-bigthree
xfs_check: /dev/mapper/vg0-bigthree contains a mounted and writable filesystem
fatal error -- couldn't initialize XFS library
Um ganz genau zu sein, habe ich zunächst versucht zu rennen
$ sudo fsck.xfs /dev/mapper/vg0-bigthree
If you wish to check the consistency of an XFS filesystem or
repair a damaged filesystem, see xfs_check(8) and xfs_repair(8).
bevor Sie sich xfs_check zuwenden.
Darüber hinaus kann ich bestätigen, dass das Gerät bzw. der Einhängepunkt des Datenträgers in der Ausgabe mount
bzw. im Gerät selbst nicht vorkommt ./etc/mtab
Antwort1
So habe ich das auf meinem System umgangen. Beim Versuch, xfs_check auszuführen, sind mir dieselben Probleme wie Ihnen aufgefallen. Das FS ist eindeutig nicht gemountet. Es scheint, als ob entweder autofs oder nfs noch am Dateisystem festhielten und die Prüfung ausgeführt wurde, nachdem sie gestoppt wurden.
[root@openfiler ~]# xfs_check /dev/backup2/backup2
xfs_check: /dev/backup2/backup2 contains a mounted and writable filesystem
fatal error -- couldn't initialize XFS library
[root@openfiler ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc2 35775912 804200 33125044 3% /
/dev/sdc1 101086 14410 81457 16% /boot
tmpfs 512440 0 512440 0% /dev/shm
[root@openfiler ~]# cat /etc/mtab
/dev/sdc2 / ext3 rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sdc1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/rpc_pipefs rpc_pipefs rw 0 0
automount(pid2644) /misc autofs rw,fd=4,pgrp=2644,minproto=2,maxproto=4 0 0
automount(pid2681) /net autofs rw,fd=4,pgrp=2681,minproto=2,maxproto=4 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
[root@openfiler ~]# service autofs stop
Stopping automount: [ OK ]
[root@openfiler ~]# cat /etc/mtab
/dev/sdc2 / ext3 rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sdc1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
[root@openfiler ~]# service nfs stop
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS services: [ OK ]
[root@openfiler ~]# cat /etc/mtab
/dev/sdc2 / ext3 rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sdc1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
[root@openfiler ~]# xfs_check /dev/backup2/backup2
Antwort2
Versuchen Sie strace -fF -o /tmp/debugfile sudo xfs_check /dev/mapper/vg0-bigthree
es dann, grep open /tmp/debugfile.*
um zu sehen, was tatsächlich hinter den Kulissen passiert, bevor xfs_check beschließt, diesen Fehler auszugeben.