Hi,
I suffered from major filesystem corruption while testing third party
patches. The filesystem shut down and was handled with xfs_repair. After
that, several directories were found in /lost+found that could no longer be
removed, e.g.:
# ls -la /lost+found/12616156/
total 8
drwxrwxrwx 2 root root 4096 2004-04-29 15:22 ./
drwxr-xr-x 12 root root 155 2004-04-30 10:53 ../
# rmdir /lost+found/12616156
rmdir: `/lost+found/12616156': Directory not empty
# # rm -rf /lost+found/12616156
rm: cannot remove directory `/lost+found/12616156': Directory not empty
Here's a trace of rm -rf /lost+found/12616156:
#v+
unlink("/lost+found/12616156") = -1 EISDIR (Is a directory)
open(".", O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 3
lstat64("/lost+found/12616156", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
chdir("/lost+found/12616156") = 0
lstat64(".", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a
directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
brk(0) = 0x8054000
brk(0x8055000) = 0x8055000
getdents64(4, /* 2 entries */, 4096) = 48
getdents64(4, /* 0 entries */, 4096) = 0
close(4) = 0
fchdir(3) = 0
lstat64(".", {st_mode=S_IFDIR|0710, st_size=4096, ...}) = 0
rmdir("/lost+found/12616156") = -1 ENOTEMPTY (Directory not empty)
#v-
Subsequent xfs_repair runs do not fix the problem, the directories are
simply unlinked and relinked in /lost+found.
Was it ext2, I would have used debugfs. What can I do to rectify this and
/ or provide any useful information?
Best regards,
--
Karol 'sziwan' Kozimor
sziwan@xxxxxxxxxxx
|