glabel: newfs vs tunefs

Ivan Voras ivoras at freebsd.org
Tue Apr 14 05:01:22 PDT 2009


Andriy Gapon wrote:
> I am not 100% sure, but it seems that glabel detects newfs -L labels very well,
> but doesn't see labels set by tunefs -L. I am not sure if ths happens always or
> "sometimes".
> Also, I used tunefs without -A option (it's documented as "potentially
> dangerous"). So could it possibly be that tunefs updates one copy of superblock,
> but glabel checks some other?

Glabel checks superblocks in the order defined in  ufs/ffs/fs.h :

 68 #define SBLOCK_FLOPPY        0
 69 #define SBLOCK_UFS1       8192
 70 #define SBLOCK_UFS2      65536
 71 #define SBLOCK_PIGGY    262144
 72 #define SBLOCKSIZE        8192
 73 #define SBLOCKSEARCH \
 74         { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }

So it's theoretically possible that tunefs modifies the old (UFS1)
location...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20090414/e8213574/signature.pgp


More information about the freebsd-geom mailing list