gmirror on a slice uncertainty

Arne Wörner arne_woerner at yahoo.com
Fri Jun 29 14:46:34 UTC 2007


--- Harry Newton <hn+freebsd at yewbarrow.net> wrote:
> done. General information below and questions at end. This might just
> be motivated by paranoia on my part ...
>
error messages and warnings show in most cases, that something isnt right...

>     p 2 0xa5 41929650 583207695
>
note: ...695

>     bsdlabel -w -B /dev/mirror/home
>
why this?
U could just make ur fs on mirror/home...
I mean: What is the partition table good for?
And wasnt partition "a" traditionally for the root fs (/)? :)

>  - this error message about partition c:
>     hydra# bsdlabel ad6s2
>     # /dev/ad6s2:
>       c: 583207694        0    unused        0     0         # "raw" part,
>     bsdlabel: partition c doesn't cover the whole unit!
>
see: ...694 (one sector less)
This is because gmirror uses the last sector of the slice, so that the gmirror
device (mirror/home) is one sector shorter than the slice...
But the beginning of the slice (ad6s2) and of the gmirror device (mirror/home)
is the same... And there bsdlabel finds the partition data...

>  - which I get on ad4s2 but not on the provided mirror:
>
Yup... Its mirrored...

>     hydra# bsdlabel /dev/mirror/home
>     # /dev/mirror/home:
>       c: 583207694        0    unused        0     0         # "raw" part,
>
Yup... Last sector of each slice (ad4s2 and ad6s2) is for the meta data...

>  - 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)...

You could solve that
1. by using hard coded disk names in gmirror
or
2. by telling fdisk to make slice 2 one sector shorter, so that ad4/ad6 and
ad4s2/ad6s2 do not share the last sector...


All errors/warnings r not so important possibly...
I think ur gmirror device would work fine (but dont trust me without tests)...

I wouldnt use a bsdlabel on the gmirror device
and
I wouldnt share the same last sector for any GEOM entity (disk, slice,
partition, device)...

-Arne



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/


More information about the freebsd-geom mailing list