Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2016 17:21:50 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Ian Smith <smithi@nimnet.asn.au>, "Patrick M. Hausen" <hausen@punkt.de>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: boot0cfg on does not set default selection on gmirror device
Message-ID:  <580A328E.4040504@quip.cz>
In-Reply-To: <20161022010007.U6806@sola.nimnet.asn.au>
References:  <14FD5FE6-6277-4EBE-8EE9-630A735F8BEA@punkt.de> <20161022005837.G6806@sola.nimnet.asn.au> <20161022010007.U6806@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Smith wrote on 2016/10/21 16:43:
> On Fri, 21 Oct 2016 13:39:57 +0200, Patrick M. Hausen wrote:
>   > Hi, all,
>   >
>   > we are repeatedly bitten by the following misbehaviour of boot0cfg:
>   >
>   > root@hd45:/usr/local # boot0cfg -s 1 mirror/m0
>   > root@hd45:/usr/local # boot0cfg -v mirror/m0
>   > #   flag     start chs   type       end chs       offset         size
>   > 1   0x80      1:  0: 1   0xa5   1022:254:63        16065     16418430
>   > 2   0x00   1023:  0: 1   0xa5   1020:254:63     16434495     16418430
>   > 3   0x00   1021:  0: 1   0xa5    768:254:63     32852925   1920667140
>   >
>   > version=1.0  drive=0x80  mask=0xf  ticks=182  bell=  (0x7)
>   > options=packet,update,nosetdrv
>   > default_selection=F2 (Slice 2)
>   >
>   > So, while it should have set the default to slice 1, it simply didn't.
>
> boot0cfg isn't mirror-aware as such and thinks it's using BIOS services
> to write to a specific drive, and likely did write to one of the disks,
> but it seems gmirror isn't updating both disks' MBRs - which might not
> be too surprising.  Does it work 'sometimes'?

We are using gmirror for whole drives mirroring from the time when it 
was introduced. It was always working with MRB/BSD.

gmirror label gm0 ada0 ada1

And then you can use fdisk + bsdlabel or gpart to create slices and 
partitions and set it bootable on /dev/mirror/gm0.

I didn't tried it with FreeBSD 10.3, but it works with 8.x (we skipped 
9.x and all 8.x boxes were upgraded to 10.2 then 10.3)

Miroslav Lachman



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