[Gllug] Linux equivalent of OS X filesystem Directory

Nix nix at esperi.org.uk
Wed Nov 19 22:41:37 UTC 2008


FOn 19 Nov 2008, gunzip stated:
> My question is whether the HFS+ filesystem directory is more vulnerable to 
> total wipeout when a few bad sectors creep in. Someone posted that ext2/3 
> creates several redundant copies of the superblock which may indictate 
> superiority in this respect but I'm not in a sufficiently informed position 
> to judge.

Superblocks are not directories. If you get a bad block in a directory that
directory is generally toast, although e2fsck will be able to recover the
files' contents (and everything else about them but their names) and
stick them in lost+found if they had no other links. (If they had other
links, they're of course still accesible via those other links: e2fsck
will repair the bad link count.)

However, if you get a bad block in the inode table --- much more likely,
as they are liable to use more disk space than directories --- you are
effectively dead: i.e. even once you've done a surface scan via e2fsck
-c to mark the bad blocks in the bad block inode, you've still lost the
contents of those inodes. And none of this can be done until the fs is
unmounted. If you hit a bad block, the FS will go read-only, panic, or
ignore it, depending on your filesystem options: the latter is
*strongly* recommended against because you might get much more data loss
if you keep using an FS like that without fscking it.

If you find you have a lot of bad blocks, ditch the drive. It should be
sparing them out, and if it isn't, it probably means you've run out of
spare sectors (some drives can tell you this in the SMART logs or SCSI
mode pages, but a lot don't bother, especially cheap consumer drives).

-- 
`Not even vi uses vi key bindings for its command line.' --- PdS
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list