[sclug] Help with e2fsck

Tom Dawes-Gamble tmdg at tmdg.co.uk
Sat Oct 25 09:05:51 UTC 2003


e2fsck will do it's thing no matter what.  The super block is the
starting block of the file systems.  I'm not so familiar with the ext2
and ext3 layout and the original system 5 file system.  It holds data
about the file system such as it's type and it's size a list of free
blocks, a list of free inodes and so on.  

Depending on the fault e2fsck may not be able to fix your file system.
If for example inode 2 has been hosed you have no idea where the root
directory is nor does e2fsck.  So you would have to use a tool like
debugfs to repair inode 2.   The more common problems such as inodes
that appear to point to files etc that e2fsck can't find in the
directory tree are put in to the lost+found directory.  

When running e2fsck you need to be a bit careful if it come across an
unreferenced inode it asks if the inode should be put in lost+found but
it a more cryptic question like "unlinked inode NNN relink y/n". of
course you should say yes. However, on a badly damaged file system you
could fill lost+found so you may choose to say 'no' so then e2fsck will
ask if the inode should be cleared.  If you say yes to that then the the
contents of that file are lost.  So one should say no at this point. 

This I think one of the reasons why running e2fsck with -y can be a bad
thing.

Even after running e2fsck and getting the file system clean there is no
guarantee you data is any good e2fsck only checks the the file system
structures.

Regards,
Tom.

On Fri, 2003-08-08 at 13:28, Paul Vanlint wrote:
> I have a server that I ran several services such as dhcp, dns, my cvs
> repository etc. The hard drive is divided into ext2 partitions.
> I back up the drive regularly, but still, the disk has crashed and I
> have lost a couple of days of stuff since my last backup. When I boot,
> it goes through the boot sequence, failing when it tries to access init
> 
> I want to run e2fsck to see if I can recover the missing files, but I am
> not sure exactly what to do, or whether I should just trust e2fsck to do
> its thing.
> 
> I thought I would just send out a question here to see if I should do
> something else first.
> 
> I have heard some things about the superblock, but don't really know
> what it is.
> 
> 
> Any suggestions or tips?
> 
> Paul.
> 
> 
> _______________________________________________
> sclug mailing list
> sclug at sclug.org.uk
> http://www.sclug.org.uk/mailman/listinfo/sclug
-- 
There are 10 sorts of people.
Those that understand binary and those that don't!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20030810/70a3c9fc/attachment.bin


More information about the Sclug mailing list