Re: Deleted files recovery

Theodore Y. Ts'o (tytso@mit.edu)
Thu, 10 Sep 1998 14:25:08 -0400


From: lm@bitmover.com (Larry McVoy)
Date: Thu, 10 Sep 1998 09:46:10 -0600

: echo -e "lsdel\nquit" | debugfs /dev/hdc1 > /dev/hda2/lsdel

This is really cool, but I have an idea for a way to make it even cooler.
If there is any space whatsoever in the on disk inode, then stick the
basename of the file in the inode and teach debugfs about this.
Anyone want to do this?

Unfortunately, there's no space in the disk inode.

The debugfs approach also requires that the filesystem be unmounted
before you can recover the files; and of course, there's no guarantee at
all how long the blocks will stay around before they get reclaimed.

It would be far cleaner to use a LD_PRELOAD shared library that
transmuted the unlink() system call to one which moved the file which is
to be deleted to a .deleted directory, with some yet-to-be-defined
method for cleaning the .deleted directory when disk space got low.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html