User: Password:
|
|
Subscribe / Log in / New account

Rebuild tree a useful feature with side-effects.

Rebuild tree a useful feature with side-effects.

Posted Dec 8, 2011 4:26 UTC (Thu) by gmatht (subscriber, #58961)
In reply to: deep recovery and embedded filesystem images by nix
Parent article: Improving ext4: bigalloc, inline data, and metadata checksums

I don't think that merging filesystems was meant to be a feature, but rather the rebuild-tree is useful feature that other fscks don't have.

If someone has stored all their precious photos and media files on a disk, and the metadata is trashed, then rebuilding the tree should get them their files back where a regular fsck wouldn't. I wouldn't trust --rebuild-tree not to add random files at the best of times, for example, I understand that it restores deleted files [1] which you probably don't want to do in a routine fsck. If, on the other hand, you've just found out that all your backups are on write-only media, rebuilding a tree from leaves could save you from losing years of work. It would be even better if it didn't merge partitions, but is still better than nothing if used as a last resort.

I think it would also be better if it encouraged you to rebuild the tree onto an entirely new partition.

[1] http://www.linuxquestions.org/linux/answers/Hardware/Reis...


(Log in to post comments)

Rebuild tree a useful feature with side-effects.

Posted Dec 8, 2011 5:35 UTC (Thu) by tytso (subscriber, #9993) [Link]

The fsck for ext2/3/4 doesn't have this feature because it doesn't need it. One of the tradeoffs of using a dynamic inode table (since in reiserfs it is stored as part of the btree) is if you lose the root node of the file system, you have no choice but to search the entire disk looking for nodes that appear to belong to the file system b-tree.

With ext 2/3/4, we have a static inode table. This does have some disadvantages, but the advantage is that it's much more robust against file system damage, since the location of the metadata is much more predictable.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds