gmirror on a slice uncertainty

Arne Wörner arne_woerner at yahoo.com
Fri Jun 29 20:07:33 UTC 2007


--- Harry Newton <hn+freebsd at yewbarrow.net> wrote:
> >>  - and this line in /var/log/messages:
> >>     WARNING: Expected rawoffset 0, found 41929650
> >>
> > 41929650 == 41929587+63
> > This is the beginning of slice 2 (see fdisk)...
> > I would guess, that slice 2 ends on the last sector of the disk, so that
> > gmirror is disturbed (it doesnt know if ad4 or ad4s2 (which share both the
> > same last sector) is its underlying disk)...
> 
> I haven't followed this. If I look at the disk with sysinstall:
> 
>     Disk name:      ad4                                    FDISK Partition
> Editor
>     DISK Geometry:  38913 cyls/255 heads/63 sectors = 625137345 sectors
> (305242MB)
>     
>     Offset       Size(ST)        End     Name  PType       Desc    Subtype 
> Flags
>     
>              0         63         62        -     12     unused        0
>             63   41929587   41929649    ad4s1      8    freebsd      165
>       41929650  583207695  625137344    ad4s2      8    freebsd      165     
>     
>      625137345       5103  625142447        -     12     unused        0
>
Ohoh... OK - so ad4 and ad4s2 do not share the last sector...
That makes my theory worthless...

> I see there's space at the end of the disk. The code that produces the
> message is in geom_bsd.c and is:
> 
>         if (rawoffset != 0 && (off_t)rawoffset != ms->mbroffset)
>                 printf("WARNING: Expected rawoffset %jd, found %jd\n",
>                     (intmax_t)ms->mbroffset/dl.d_secsize,
>                     (intmax_t)rawoffset/dl.d_secsize);
>
Hmm... Dont know what that might mean...

> But I'm now confused as to what the importance of this message is ?
>
I would guess, geom_bsd pulls it straight automatically...
You could test that by comparing the files tempX and tempY:
% dd if=/dev/ad4s2 iseek=0 of=/tmp/tempX count=128
% dd if=/dev/ad4 iseek=41929650 of=/tmp/tempX count=128
% cmp /tmp/temp[XY]

> > You could solve that
> > 1. by using hard coded disk names in gmirror
> 
> Is this to prevent ad4 and ad4s2 being confused ? Doesn't gmirror know
> what the components that make up the provider are ? 
>
Yup... But that seems to be no problem here...
So "hardcoded" would make no sense here...

What about my idea to not use any bsdlabel on mirror/home?
U can just delete it with:
% dd if=/dev/zero of=/dev/mirror/home count=16

-Arne


       
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php


More information about the freebsd-geom mailing list