A plea for help; or, how to shoot yourself in the foot with ext3

Matija Nalis mnalis-ml at voyager.hr
Tue Jul 7 18:24:41 UTC 2009

On Tue, Jul 07, 2009 at 09:08:02AM -0700, Nathan Anderson wrote:
> * There are 2MiB + 8KiB contiguous "chunks" consisting completely of 0s  
> with the exception of the first 64 bytes of the chunk, 63 of which are  
> FF/255 and the 64th which is value 3.  Where those "chunks" exist, my  
> data is gone/overwritten.
> Based on this info, does this sound like something that mkfs.ext3 (may  
> it be exposed to the flames of Hades for all eternity[1]) would do/have  
> done?  And does the ext3 formatting process really have to be so  
> destructive?

Yes, ext2/ext3 does scatter data structures around the disk in such a way.
The reasons are both for performance (keeping some metadata closer to the
data it relates to, thus requiring less head movement) and safety (so if 
you overwrite just beggining of the disk for example, you could recover
undamaged parts of the FS from backup superblocks etc).

> Thanks for listening, and if anybody either has any suggestions or can  
> at least confirm for me that it is a lost cause so I can stop worrying  
> about it and waste no more time on research, I would be grateful.

As of idea for trying to recover, it's probably easiest to just go with the
last backup and then try to recover (using boot CD/USB) relatively smaller
files which have higher chances of survival from mkfs.ext3 shotgun (like
config files, documents, bookmarks, etc), or at least most important of

However, alternatively you might want to make a program which will go over
the damaged parts (you should first calculate where exactly that is) and
copy over them only that damaged blocks from your old bit-for-bit backup. 
In that way, you might be able to even boot the system (as system files have
a higher chance to be recovered that way as they don't move around disk much
unless you do big system upgrades). You also *might* recover some more of
the user stuff that way, but not all. Of course, if you've been moving files
around much from last backup and/or been defragmenting your filesystems,
your chances for success are much lower.

You should make bit-for-bit image (of this broken filesystem!) first (for
which you will need extra space, of course); as you might not get the
program right on the first try, and you don't want to incur any more

Opinions above are GNU-copylefted.

More information about the Ext3-users mailing list