http://oss.sgi.com/bugzilla/show_bug.cgi?id=327
Summary: Indestructible directories
Product: Linux XFS
Version: Current
Platform: IA32
OS/Version: Linux
Status: NEW
Severity: normal
Priority: Medium
Component: xfsprogs
AssignedTo: xfs-master@xxxxxxxxxxx
ReportedBy: sziwan@xxxxxxxxxxxxxxxxxxxxx
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.
As requested, I provide more info:
# xfs_info /
meta-data=/ isize=256 agcount=8, agsize=192276 blks
= sectsz=512
data = bsize=2048 blocks=1538208, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=0
naming =version 2 bsize=4096
log =internal bsize=2048 blocks=1728, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=65536 blocks=0, rtextents=0
# xfs_bmap -vv /lost+found/12616156
/lost+found/12616156:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL
0: [0..7]: 4626592..4626599 6 (11968..11975) 8
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
|