May be a bug in fsck [ after super block crash on 5.4-STABLE ]

Yar Tikhiy yar at comp.chem.msu.su
Sun Nov 6 06:49:24 PST 2005


On Thu, Nov 03, 2005 at 03:25:28PM +0300, Taras Savchuk wrote:
> On 11/3/05, Taras Savchuk <taras.savchuk at gmail.com> wrote:
> >
> > My SATA HDD with UFS2 crashed. While checking HDD fsck said, that
> > alternate super block at block 32 is not present. In 'man fsck' I saw, that
> > in UFS2 (my file system) alternate super block is usually located in block
> > 160 (For UFS1 - in 32). So the question is: why fsck trying to find
> > alternate superblock in wrong block for UFS2? I can suppose, that fsck dont
> > know file system type (UFS1 or UFS2) while checking, but such assumption
> > seems to be wrong.
> 
> PS: With '-b 160' option fsck done work well.

Isn't the type, UFS1 or UFS2, indicated by a magic number in the
superblock itself?  I used to believe so.  If it's true, fsck cannot
know the FS type prior to locating a superblock copy.  OTOH, with
UFS2 having become popular, fsck might try both locations, 32 and 160.
Care to file a PR?

-- 
Yar


More information about the freebsd-current mailing list