You are not logged in.

#1 2013-05-04 19:10:42

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Can't Run xfs_check

I made the mistake of DDing a small image to a device which I thought was an sdcard but actually turned out to be my 3 TB HDD. Luckily xfs_repair ran and recovered pretty much everything and all my files are in lost+found with numeric folder names. I can browse the directory and move stuff but it's being really slow to read the directories, I decided to run xfs_check but it won't run.

Every time I try to run it I get this:

[root@ra /mnt/moremedia/lost+found]# strace -fF -o /tmp/debugfile sudo xfs_check /dev/sde1
xfs_check: /dev/sde1 contains a mounted and writable filesystem

fatal error -- couldn't initialize XFS library

I don't have the device mounted and the only daemon that was accessing it was samba and I stopped that, but it still won't run. I saw someone recommended running strace and look at the errors which mentioned a lot of of errors about xfsprogs.mo no being found.

Here's the strace

Here's a bunch of No Such File or Directory errors:

13741 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
13741 stat("/etc/sudo.conf", 0x7fff7311b130) = -1 ENOENT (No such file or directory)
13741 connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
13741 connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
13741 stat("/dev/wscons", 0x7fff73118160) = -1 ENOENT (No such file or directory)
13741 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13741 open("/usr/share/locale/en_US.utf8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13741 open("/usr/share/locale/en_US/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13741 open("/usr/share/locale/en.UTF-8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13741 open("/usr/share/locale/en.utf8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13741 open("/usr/share/locale/en/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13741 connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
13741 connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
13741 stat("/usr/lib/qt4/bin/xfs_check", 0x7fff7311b080) = -1 ENOENT (No such file or directory)
13741 stat("/usr/local/bin/xfs_check", 0x7fff7311b080) = -1 ENOENT (No such file or directory)
13741 stat("/usr/bin/xfs_check", 0x7fff7311b080) = -1 ENOENT (No such file or directory)
13741 stat("/bin/xfs_check", 0x7fff7311b080) = -1 ENOENT (No such file or directory)
13741 stat("/usr/local/sbin/xfs_check", 0x7fff7311b080) = -1 ENOENT (No such file or directory)
13741 access("/var/run/utmpx", F_OK)    = -1 ENOENT (No such file or directory)
13742 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
13742 open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
13742 stat("/usr/lib/qt4/bin/xfs_db", 0x7fff11a75af0) = -1 ENOENT (No such file or directory)
13742 stat("/usr/local/bin/xfs_db", 0x7fff11a75af0) = -1 ENOENT (No such file or directory)
13742 stat("/usr/bin/xfs_db", 0x7fff11a75af0) = -1 ENOENT (No such file or directory)
13742 stat("/bin/xfs_db", 0x7fff11a75af0) = -1 ENOENT (No such file or directory)
13742 stat("/usr/local/sbin/xfs_db", 0x7fff11a75af0) = -1 ENOENT (No such file or directory)
13743 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
13743 stat("rootfs", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("proc", 0x7fffecbf4310)      = -1 ENOENT (No such file or directory)
13743 stat("sys", 0x7fffecbf4310)       = -1 ENOENT (No such file or directory)
13743 stat("dev", 0x7fffecbf4310)       = -1 ENOENT (No such file or directory)
13743 stat("run", 0x7fffecbf4310)       = -1 ENOENT (No such file or directory)
13743 stat("securityfs", 0x7fffecbf4310) = -1 ENOENT (No such file or directory)
13743 stat("tmpfs", 0x7fffecbf4310)     = -1 ENOENT (No such file or directory)
13743 stat("devpts", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("tmpfs", 0x7fffecbf4310)     = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("cgroup", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("mqueue", 0x7fffecbf4310)    = -1 ENOENT (No such file or directory)
13743 stat("debugfs", 0x7fffecbf4310)   = -1 ENOENT (No such file or directory)
13743 stat("hugetlbfs", 0x7fffecbf4310) = -1 ENOENT (No such file or directory)
13743 stat("systemd-1", 0x7fffecbf4310) = -1 ENOENT (No such file or directory)
13743 stat("configfs", 0x7fffecbf4310)  = -1 ENOENT (No such file or directory)
13743 stat("tmpfs", 0x7fffecbf4310)     = -1 ENOENT (No such file or directory)
13743 stat("fusectl", 0x7fffecbf4310)   = -1 ENOENT (No such file or directory)
13743 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/xfsprogs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13743 open("/usr/share/locale/en_US.utf8/LC_MESSAGES/xfsprogs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13743 open("/usr/share/locale/en_US/LC_MESSAGES/xfsprogs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13743 open("/usr/share/locale/en.UTF-8/LC_MESSAGES/xfsprogs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13743 open("/usr/share/locale/en.utf8/LC_MESSAGES/xfsprogs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
13743 open("/usr/share/locale/en/LC_MESSAGES/xfsprogs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

These are the only two locations that xfsprogs.mo exists

[root@ra /mnt/moremedia/lost+found]# locate xfsprogs.mo
/usr/share/locale/de/LC_MESSAGES/xfsprogs.mo
/usr/share/locale/pl/LC_MESSAGES/xfsprogs.mo

Offline

#2 2013-05-04 19:20:49

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 288

Re: Can't Run xfs_check

It is advised to use xfsdump to dump a filesystem to a file, then mkfs.xfs the device and xfsrestore to the device instead of xfs_repair. However, xfsdump works only if filesystem is mountable. Hope it's a better workaround for you.

Offline

#3 2013-05-04 19:26:04

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Can't Run xfs_check

Ah ok, thanks for the info!

Offline

Board footer

Powered by FluxBB