G_PART macro definitions

perryh at pluto.rain.com perryh at pluto.rain.com
Sat Dec 4 10:11:11 UTC 2010


I wrote:

> > 4. ad0s2a is offered for tasting. It depends which ranges has
> > this provider, by default it starts with zero offset
>
> I had gotten the impression somewhere that "a" partitions started
> at a non-zero block offset in the slice ...

I found out where I got that impression:  it was from observing
the output of bsdlabel(8) on 8.1-RELEASE!  The offset of the "a"
partition is shown as 16 blocks, not zero, immediately after
creating a default label with "disklabel -w".  (This example is
from a script(1) of the session in which I first labelled gm0;
I am fairly sure that, when I was partitioning ad0s2, a: was at
offset 16 also although I don't have a log of that session.)

  Fixit# disklabel -w -B /dev/mirror/gm0
  Fixit# disklabel /dev/mirror/gm0
  # /dev/mirror/gm0:
  8 partitions:
  #        size   offset    fstype   [fsize bsize bps/cpg]
    a: 619907501       16    unused        0     0       
    c: 619907517        0    unused        0     0         # "raw" part, don't edit

Another example, this one from 8.0, showing that it is not
"just me" who sees an "a" partition at a 16-block offset:

http://lists.freebsd.org/pipermail/freebsd-questions/2010-November/224625.html

Now I am back to wondering what happened to my "outer" label,
originally written on ad0s2 and defining partitions ad0s2a and
ad0s2b, since gm0 (and hence its label) should have started at
the beginning of ad0s2a -- 16 blocks _beyond_ the start of ad0s2.
Does gmirror insist on its providers being track- or cylinder-
aligned?


More information about the freebsd-geom mailing list