Subject: vnd & disklabel woes
To: None <current-users@netbsd.org>
From: Antti Kantee <pooka@cs.hut.fi>
List: current-users
Date: 02/26/2007 23:53:54
Is anyone else seeing a problem with vnd disklabels on a 4.99.12 vintage
system?  If I configure a vnd, the first in-core label I get looks a bit
wrong:

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 b:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 c:    524225        63     unused      0     0        # (Cyl.      0*-    255)
 d:    524288         0     unused      0     0        # (Cyl.      0 -    255)
 e:    524225        63     4.2BSD      0     0     0  # (Cyl.      0*-    255)
 f:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 g:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 h:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 i:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 j:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 k:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 l:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 m:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 n:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 o:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)
 p:    524288         0     4.2BSD      0     0     0  # (Cyl.      0 -    255)

The on-disk label has nothing wrong with it:

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    524225        63     4.2BSD   1024  8192 43688  # (Cyl.      0*-    255)
 c:    524225        63     unused      0     0        # (Cyl.      0*-    255)
 d:    524288         0     unused      0     0        # (Cyl.      0 -    255)

And if I disklabel -R -r the latter onto the vnd, the in-core label
is fixed.  So why is the initial label created incorrectly?

-- 
Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"