ReiserFS undeletion: the lost, the found, and the ugly
When mass-renaming video files for Mai-HiME (which I recommend to anime fans out there, unless anything involving magical girls in any way is not your thing; but not the point), I made a mistake in the mv command, which caused all files to be moved to a single destination. I quickly pressed Ctrl-C, but the first four files were lost.
I immediately Googled up an instruction on undeleting files on reiserfs, which (to my dismay) involved unmounting the partition and running reiserfsck --rebuild-tree -S as root. My first thought was: “What a fool I was to choose reiserfs! Surely ext3 can handle undeletion much more gracefully!”
Anyway, I dropped to the root shell, unmounted /home, and in about three hours, it finished. Free space on the partition decreased by about 4 GB, and I found a lot of files in /home/lost+found, many of which turned out to be familiar. I copied files roughly within the size range to a different directory and found three of the four videos (thanks to Nautilus happily displaying thumbnails), but the fourth seemed to be lost.
In retrospect, I should have probably just waited until Monday and asked the guy to whom I lent the DVDs to return them. (And of course, I had no other backup — a lesson to be learned here.) As I remounted the partition and loaded GNOME, minor inconveniences began to pile up.
- The Tomboy applet failed to load at the first login, but subsequent logins fixed it.
- The custom GNOME theme (modified Murrine Brave) became corrupted, and I had to restore it from a UFD (where I copied it to bring it to another computer).
- Thunderbird now just crashed at startup without opening any windows. Luckily, I migrated from POP3 to IMAP Gmail a while ago and moved all my sent mail from the local folders, so just killing the profile was a good option.
- OpenOffice.org and Gajim preferences were reset.
- An Eclipse workspace lost all projects and I had to reimport them. Then it turned out that some Java and C++ projects in this workspace now refused to build because reiserfsck restored them at their previous locations, rather than in
lost+found! I had to redelete them. - Worst and strangest of all, the GTK file dialog now takes a minute to pop up. (Nautilus, mc and the Qt dialog all work fine.) I deleted everything from
/home/lost+foundand cleaned up the home directory, but the problem still persists…
Was all this worth a partial recovery of deleted files that I could obtain from elsewhere? If it was crucial data, probably… but it wasn’t.
But at least reiserfs has some kind of undeletion — slow, intrusive, problem-prone, but it works. Partially. It turned out ext3 didn’t have even that (while ext2 actually had nicer undeletion).
Maybe I should split the file dump from the home partition and migrate it to ext2…