tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ext2fs superblock updates



>> They are generated by _newfs_ and left untouched thereafter.
> Interesting, thanks.  what's so useful about the superblock at newfs
> time?

It contains enough information for fsck to find other critical things
(like cylinder groups and their inode tables).  If the primary
superblock has been destroyed but the rest of the filesystem is intact,
fsck is supposed be able to put the filesystem back together with the
help of a backup superblock.

> is that for disaster recovery when half my drive is gone and I might
> be able to salvage something from a cylinder?

Yes...or something has trashed the primary superblock but not (most of)
the rest of the filesystem.  For example, if you start copying raw
disks and carelessly write to the wrong device, and stop it early, you
might be able to salvage most of the damaged filesystem that way.

In practice, I would say they are largely historical artifacts at this
point - I can't remember the last time a backup superblock was of use
to me.  (It's happened, maybe as many as five times, but the most
recent was I-can't-recall-when ago.)

They made a lot more sense in the days before disk drives that
auto-spare flaky sectors (the superblock gets ovewritten heavily) and
sysadmins a significant fraction of whom were competent to do things
like manually repair damaged filesystems.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index