lvm – 为什么不运行xfs_check?

前端之家收集整理的这篇文章主要介绍了lvm – 为什么不运行xfs_check?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在运行一个完全更新的Ubuntu 9.04“Jaunty”i686服务器.我在LVM组中有一个名为/ dev / mapper / vg0-bigthree的XFS卷.

如果我启动到单用户模式并确保已卸载卷,则每次尝试运行xfs_check时仍会收到以下内容

$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

为了彻底,我开始尝试运行

$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).

在转向xfs_check之前.

另外,我可以确认在mount的输出或卷的设备或挂载点的/ etc / mtab中没有出现.

解决方法

这就是我在我的系统上解决这个问题的方法.在尝试运行xfs_check时,我看到了与您相同的问题.显然fs没有安装.似乎autofs或nfs仍然保留在文件系统上,一旦它们被停止,检查就会运行.
[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,pgrp=2681,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,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,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
原文链接:https://www.f2er.com/linux/395967.html

猜你在找的Linux相关文章