[H-GEN] Idea for journalling filesystems

Jason Parker-Burlingham jasonp at panix.com
Sun Jun 29 19:29:43 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Just this weekend I had to recover some valuable files from an ext2
disk which had suffered *major* filesystem corruption---the machine
either crashed or was rebooted prematurely; a fsck was run but that
simply unlinked everything.  After the fsck, I think the superblock
was bad, so we tried alternate superblocks[1] but while they seemed
to be fine[2] there was something wrong with the bad block list.

Okay.  Fine.  Eventually the filesystem was "recovered":  the truly
crucial files were found in lost+found after a harrowing "fsck -y";
I had to dump the bad block list, and read it back in, and cross my
fingers.

This got me to thinking:  (1) I'd like documentation about the guts
of the various filesystems available for Linux (i.e ext2, ext3, and
XFS); (2) I'd like to find a curses application which can allow one
to navigate any or all of these filesystems in order to find files;
(3) I'd like to get a little more serious about preventing this bad
mojo in the first place.

(1) and (2) I don't have much clue about.  If list members have any
idea I'd like to hear about it.  (3) is what I think I might have a
good solution to.  As many of you know I run XFS at home, so I am a
bit biased toward it, but since mkfs.xfs(8) allows you to say where
the log device is (the logdev=/dev/sdfoo option), why not create it
on one of those neato USB keychain drive thingies?  They're not too
expensive, have no moving parts, the data won't travel over the IDE
bus (thereby saving you---somewhat---if the IDE controller has goes
a bit mental) and they're basically the right size for the job!

Right now I'm having trouble seeing any fatal flaws in this scheme.
Well, okay, the drive might not be the fastest thing around, but as
I recall we're supposed to benchmark first and optimize second, and
maybe USB2 will come to my rescue here.  Anyone have an opinion?  I
mean, everyone has one.  Does anyone have a useful opinion?

jason

[1] : dumpe2fs is valuable in tracking down superblocks.  I can say
      I heartily recommend its use *before* things break, too.

[2] : One gripe I have with the ext2 tools is that sometimes you're
      supposed to multiply block numbers by the block size, and yet
      at other times you are not.  This complicates recovery as I'm
      sure you can imagine.
-- 
Stay up-to-date on what I'm doing lately:
                                 http://www.panix.com/~jasonp

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list