Re: undeletable files in /lost+found

Peter T. Breuer (ptb@it.uc3m.es)
Tue, 16 Jun 1998 10:46:06 +0200 (MET DST)


"A month of sundays ago Phil's Kernel Account wrote:"
>
> #On Tue, 16 Jun 1998, Joseph Skinner wrote:
> #> The files have attributes like the following
> #> any idea how this sort of file may be deleted?
> #You'll need to use debugfs and clear the inodes. /bin/rm just won't do
> #it.
>
> Fair warning.
>
> debugfs: ls -l
> 11 40755 0 0 12288 28-May-98 23:32 .
> 2 40755 0 0 1024 10-Jun-98 10:40 ..
> 0 0 0 0 0 31-Dec-69 19:00 #28859
> 28945 66537 29541 14385 1701273971 1-Jun-75 09:54 #28945
> 28946 67056 29797 28265 1919959306 15-Aug-95 02:09 #28946
> Segmentation fault
>
> [root@eiterra /lost+found]# ls -la |more
> total 3769209649
> br-s-wsrwx 1 29541 14385 117, 110 Jun 1 1975 #28945
> b--Sr-srwT 1 29797 28265 50, 48 Aug 15 1995 #28946
> br-s-wsrwx 1 29541 14385 117, 110 Jun 1 1975 #29081
> b--Sr-srwT 1 29797 28265 50, 48 Aug 15 1995 #29082
>
> In short; ls -l is broken severely in debugfs, one. And two, when your
> filesystem looks like THAT, it may end up being easier to mkfs.ext2 yer
> drive. ;P

Well, that's not fair. That ain't my FS, but I've been in that hole
myself (even done it deliberately just to annoy an extremely stupid
sysop).

It is quite possible for ext2 to get into a state where it creates
files that can't be deleted. I don't mean "immutable" - i.e. no hidden
bit tricks. Really, honestly can't be deleted. The same is true of
solaris, btw. The above snatch looks familiar to anyone who has seen
a corrupt FS on solaris!

The only remedy I have found is:

1) make a new directory.
2) move all the GOOD files out of the old directory into the new.
3) rename the old directory to something silly. Rename the new
directory to the old one.

Then forget about it.

Sure, actually twiddling the fS structure myself might do it, but I
know how to avoid introducing bugs into a system, and low level
twiddling isn't it!

(I last munged my FS this way after trying a couple of hours running my
PCI bus at 83MHz/2)

> -Phil R. Jaenke (kernel@nls.net / prj@nls.net)

Peter ptb@it.uc3m.es

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu