Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2004 20:19:38 +0100
From:      Chris Elsworth <chris@shagged.org>
To:        Paul Mather <paul@gromit.dlib.vt.edu>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: WARNING: Expected rawoffset 0, found 63 ?
Message-ID:  <20040924191938.GA84500@shagged.org>
In-Reply-To: <1096050986.9306.72.camel@zappa.Chelsea-Ct.Org>
References:  <20040924160620.GA77997@shagged.org> <1096044939.9306.54.camel@zappa.Chelsea-Ct.Org> <20040924171810.GA80912@shagged.org> <1096050986.9306.72.camel@zappa.Chelsea-Ct.Org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 24, 2004 at 02:36:27PM -0400, Paul Mather wrote:
> On Fri, 2004-09-24 at 13:18, Chris Elsworth wrote:
> 
> > At this point, or indeed, even now, if you disklabel -r on your mirror
> > device, does it not give you warnings about partition c? If not,
> > that's where we start to differ :)
> 
> First of all, you should probably get into the habit of using bsdlabel
> under 5.x, not disklabel.  (I remember at one point that disklabel used
> to complain about that rawoffset difference.)  Perhaps they are exactly
> the same nowadays, but at one point they weren't.

They seem to be exactly the same at the moment (same inode) although
that might not be true forever, so noted, thanks :)


> Here's what I get when I run disklabel on my mirror:
> 
> >>>>>
> zappa# disklabel -r /dev/mirror/raid1
> # /dev/mirror/raid1:
> 8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   a:   524288        0    4.2BSD     2048 16384 32776 
>   b:  2039392   524288      swap                    
>   c: 20964760        0    unused        0     0         # "raw" part, don't edit
>   d:   524288  2563680    4.2BSD     2048 16384 32776 
>   e: 17876792  3087968    4.2BSD     2048 16384 28552 
> <<<<<
> 
> The only time I get a complaint about partition c is when I run it on
> the underlying components (providers).  Then, it complains about it not
> covering the whole device, which makes sense because it is picking up a
> "ghost" label of the mirror, which is slightly smaller than the
> underlying providers because it uses a few sectors from them for its own
> metadata.  E.g.:

Aha! After reading that a couple of times something clicked - the
mirror had the disklabel from the disk *before* the mirror was
applied. So I created the mirror, then cleaned the mirror with a dd of
zero bytes to the first few sectors, then bsdlabel -w /dev/mirror/gm,
and I have the following:

app1# bsdlabel -r /dev/da1s1
# /dev/da1s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 71119675       16    unused        0     0
  c: 71119691        0    unused        0     0         # "raw" part, don't edit
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system utilities
app1# bsdlabel -r /dev/mirror/gm
# /dev/mirror/gm:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 71119675       16    unused        0     0
  c: 71119691        0    unused        0     0         # "raw" part, don't edit


So now another two things crop up - where has that a partition come from
(perhaps that's just what bsdlabel -w does by default, no big deal)
but more importantly, why do they both have an offset of 16 bytes..
It didn't seem to mind me changing it to zero, though. So now I'll see
if I can get it booting :)

Thanks for the brain stirring, it did the trick :)

-- 
Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040924191938.GA84500>