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

Gleb Smirnoff glebius at FreeBSD.org
Sun Nov 6 13:11:40 PST 2005


On Sun, Nov 06, 2005 at 11:05:28PM +0800, Xin LI wrote:
X> On 11/6/05, Yar Tikhiy <yar at comp.chem.msu.su> wrote:
X> > Isn't the type, UFS1 or UFS2, indicated by a magic number in the
X> > superblock itself?  I used to believe so.  If it's true, fsck cannot
X> > know the FS type prior to locating a superblock copy.  OTOH, with
X> > UFS2 having become popular, fsck might try both locations, 32 and 160.
X> > Care to file a PR?
X> 
X> That's correct.  Fortunately, given that we have some ways to validate
X> whether the superblock is valid, it is not too hard to automatically
X> detect which type the FS actually is.

I think this feature is already present in libufs, since dumpfs(8)
can detect UFS1/UFS2 type of filesystem.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE


More information about the freebsd-current mailing list