Skip to contentSkip to conversation

[2.6.12] XFS: Undeletable directory

DISCUSSION Jan De Luyck 4 participants 7 messages Jun 19, 2005 – Jun 21, 2005 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello lists,

I've had some XFS troubles today, and after cleaning up with xfs_repair and so I'm stuck with one undeletable directory in /lost+found:

precious:/lost+found# ls -l
total 8
drwxrwxrwx  2 root root 8192 Jun 19  2005 4207214
precious:/lost+found# rm -r 4207214
rm: cannot remove directory `4207214': Directory not empty
precious:/lost+found# ls -l 4207214/
total 0
precious:/lost+found# 

So there's one dir 4207214 there, and i can rename it and whatever, just not remove it.

xfs_repair didn't solve the problem.

Any ideas?

Thanks,

Jan

Signature · 6 lines
    ***
  *******
 *********
 ****** Confucious say: "Is stuffy inside fortune cookie."
  *******
    ***

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.63.0506191924430.7686@hobbybop

#2 lore raw
Quoted 3 lines · Edwin Eefting

ls -la 4207214/ also shows nothing?
perhaps there's something weirds thats hidden.

Nothing out of the ordinary:

devilkin@precious:/lost+found$ ls -la 4207214/
total 8
drwxrwxrwx  2 root root 8192 Jun 19  2005 .
drwxr-xr-x  3 root root   20 Jun 19  2005 ..
devilkin@precious:/lost+found$ 

Jan

Signature · 1 line
  We are not anticipating any emergencies.
#3 lore raw
Quoted 9 lines · Jan De Luyck
Quoted 1 line · Edwin Eefting

ls -la 4207214/ also shows nothing?

Nothing out of the ordinary:

devilkin@precious:/lost+found$ ls -la 4207214/
total 8
drwxrwxrwx  2 root root 8192 Jun 19  2005 .
drwxr-xr-x  3 root root   20 Jun 19  2005 ..

Might want to do 'ls -lai' to get the inode numbers for . and .. and then go sanity check them ('.' should have the same inode number as lost+found/4207214, and '..' should have the same inode number as lost+found)

(and yes, I *know* fsck should whinge loudly if this is the case. Wouldn't be the first time I've seen an fsck fail to pick up on obvious corruption...)

#4 lore raw
Quoted 11 lines · On Monday 20 June 2005 01:02, [email protected] wrote:
Quoted 9 lines · Jan De Luyck
Quoted 1 line · Edwin Eefting

ls -la 4207214/ also shows nothing?

Nothing out of the ordinary:

devilkin@precious:/lost+found$ ls -la 4207214/
total 8
drwxrwxrwx  2 root root 8192 Jun 19  2005 .
drwxr-xr-x  3 root root   20 Jun 19  2005 ..
Quoted 4 lines

Might want to do 'ls -lai' to get the inode numbers for . and .. and then go sanity check them ('.' should have the same inode number as lost+found/4207214, and '..' should have the same inode number as lost+found)

The inode numbers are correct.

Jan

Signature · 2 lines
If the very old will remember, the very young will listen.
		-- Chief Dan George
#5 lore raw
In reply to Jan De Luyck
Quoted 14 lines · Jan De Luyck

Hello lists,

I've had some XFS troubles today, and after cleaning up with xfs_repair and so I'm stuck with one undeletable directory in /lost+found:

precious:/lost+found# ls -l
total 8
drwxrwxrwx  2 root root 8192 Jun 19  2005 4207214
precious:/lost+found# rm -r 4207214
rm: cannot remove directory `4207214': Directory not empty
precious:/lost+found# ls -l 4207214/
total 0
precious:/lost+found# 
Quoted 6 lines

So there's one dir 4207214 there, and i can rename it and whatever, just not remove it.

xfs_repair didn't solve the problem.

Any ideas?

What does: xfs_db -r -c 'inode 4207214' -c print /dev/XXX report?

I have seen a similar thing once before, awhile back, where the directory inode was "empty" (only . and ..) and hence should've been in shortform, but other fields indicated the inode was in extent form still. Never got to the bottom of it... I'd guess there's somehow a case where the kernel XFS code can miss this transformation - not sure where/how though.

If it comes to it, you can always zero out individual inode fields for that inode in xfs_db (with -x option to enable write mode) and then xfs_repair should be able to get past it.

cheers.

Signature · 1 line
Nathan
#6 lore raw
Quoted 2 lines · Nathan Scott

What does: xfs_db -r -c 'inode 4207214' -c print /dev/XXX report?

precious:/lost+found/4207214# xfs_db -r -c 'inode 4207214' -c print /dev/hda6
core.magic = 0x494e
core.mode = 040777
core.version = 1
core.format = 2 (extents)
core.nlinkv1 = 2
core.uid = 0
core.gid = 0
core.flushiter = 275
core.atime.sec = Sun Jun 19 20:38:29 2005
core.atime.nsec = 790399992
core.mtime.sec = Sun Jun 19 20:37:45 2005
core.mtime.nsec = 608116720
core.ctime.sec = Sun Jun 19 20:38:16 2005
core.ctime.nsec = 795375536
core.size = 8192
core.nblocks = 2
core.extsize = 0
core.nextents = 2
core.naextents = 0
core.forkoff = 0
core.aformat = 2 (extents)
core.dmevmask = 0
core.dmstate = 0
core.newrtbm = 0
core.prealloc = 0
core.realtime = 0
core.immutable = 0
core.append = 0
core.sync = 0
core.noatime = 0
core.nodump = 0
core.rtinherit = 0
core.projinherit = 0
core.nosymlinks = 0
core.gen = 0
next_unlinked = null
u.bmx[0-1] = [startoff,startblock,blockcount,extentflag] 0:[1,286547,1,0] 1:[8388608,286559,1,0]
precious:/lost+found/4207214# 
Quoted 3 lines

If it comes to it, you can always zero out individual inode fields for that inode in xfs_db (with -x option to enable write mode) and then xfs_repair should be able to get past it.

Any idea how this should be set?

Thanks.

Signature · 3 lines
Hacker's Law:
	The belief that enhanced understanding will necessarily stir
	a nation to action is one of mankind's oldest illusions.
#7 lore raw
Quoted 6 lines · Jan De Luyck
Quoted 3 lines · Nathan Scott

If it comes to it, you can always zero out individual inode fields for that inode in xfs_db (with -x option to enable write mode) and then xfs_repair should be able to get past it.

Any idea how this should be set?

    # xfs_db -x -c 'inode XXX' -c 'write core.nextents 0' -c 'write core.size 0' /dev/hdXX

Cheers!

--> Jijo

Signature · 2 lines
Federico Sevilla III : jijo.free.net.ph : When we speak of free software
GNU/Linux Specialist : GnuPG 0x93B746BE : we refer to freedom, not price.