Setup problem with multiple mirrored devices

Brent Hostetler brenthostetler at gmail.com
Fri Jan 27 08:40:37 PST 2006


On 1/27/06, Pawel Jakub Dawidek <pjd at freebsd.org> wrote:
> Which FreeBSD version do you use?
> It should work fine with 6.0. If you cannot upgrade, you need to use -h
> option, eventually you can create slices one sector smaller so they
> don't end at the same sector as disk.

files # uname -a
FreeBSD files.hostetler.ws 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov
 3 09:36:13 UTC 2005    
root at x64.samsco.home:/usr/obj/usr/src/sys/GENERIC  i386

>
> BTW. Don't create partitions on adXsX if you mirror slices. Instead
> create them on mirror provider.

Since it kept mixing up ad6 for ad6s1 I was trying to save a sector in
the label for the meta-data.. stupid.. I know.

I would think I could do this:  ( this is what you mean correct? )

files# diskinfo ad4
ad4     512     160041885696    312581808       310101  16      63

sector size is 312581808 so make slice one sector smaller.

files# ( echo "p 1 165 63 312581807"; echo "a 1" ) | fdisk -v -f- -i /dev/ad4
files# ( echo "p 1 165 63 312581807"; echo "a 1" ) | fdisk -v -f- -i /dev/ad6

files# fdisk -s ad4
/dev/ad4: 310101 cyl 16 hd 63 sec
Part        Start        Size Type Flags
   1:          63   312581745 0xa5 0x80
files# fdisk -s ad6
/dev/ad6: 310101 cyl 16 hd 63 sec
Part        Start        Size Type Flags
   1:          63   312581745 0xa5 0x80
files#

files# gmirror label -v -n -b round-robin M2 ad4s1
files# gmirror insert M2 ad6s1

files# gmirror status
         Name    Status  Components
mirror/gmroot  COMPLETE  ad0s1
                         ad2s1
    mirror/M1  COMPLETE  ad0s2
                         ad2s2
    mirror/M2  DEGRADED  ad4s1
                         ad6
files#

files# gmirror deactivate M2 ad6
files# gmirror clear ad6
files# gmirror forget M2

files# gmirror insert -h M2 ad6s1
files# gmirror status
         Name    Status  Components
mirror/gmroot  COMPLETE  ad0s1
                         ad2s1
    mirror/M1  COMPLETE  ad0s2
                         ad2s2
    mirror/M2  DEGRADED  ad4s1
                         ad6s1


So whats going on?? It's like gmirror cant decide whether the meta is
for provider ad6 or ad6s1. It also does not matter order I bring the
mirror up in. If I start with ad6 then it is ad4 that has the issues.

Please Advise...

I shouldnt have to hardcode the provider name correct?


Thanks for your previous quick response! :)

Brent.


More information about the freebsd-geom mailing list