location of file-system information on ext4

Theodore Ts'o tytso at mit.edu
Sun May 11 18:58:52 UTC 2014


On Sat, May 10, 2014 at 06:42:50PM +0000, Martin T wrote:
> 
> Am I correct that there are multiple super-blocks scattered around the
> HDD and if first one is missing, then next one is read by file or
> dumpe2fs utilities? In the first place, what (important) file-system
> data is written at the beginning of the partition?

There are multiple super blocks scattered around the HDD, but they are
used primarily by e2fsck, for the purposes of trying to repair a
corrupted file system.  As far as I know dumpe2fs (definitely) and
file (almost certainly) doesn't fall back and try the alternate
superblocks.

Was the file system mounted at the time when you tried running the dd
command to zero the first 10MB of your SSD?  The only thing I can
think of is that the file system was mounted, and so the superblock
was written back when you zero'ed the SSD, via some artifact of buffer
cache (non-)aliasing.

You could check by running the command od /dev/sda1 | head and seeing
if the first 8k or so of the file system really is all zero's or not.

In answer to your question, portions of the inode table are located at
the begining of the file system, so the root inode would have been
lost if the first 10MB or so of the file system really was smashed.

     	    	       	     	    	 	- Ted




More information about the Ext3-users mailing list