boot0cfg and gmirror again

Patrick M. Hausen hausen at punkt.de
Fri Oct 30 16:01:19 UTC 2009


Hi, all,

Our hosting servers use a NanoBSD disk layout for rapid
updates and - if necessary - fallback to the former working
version of the system.

I just tested the update from RELENG_6_3 to RELENG_7_2,
because I was concerned about the one-way upgrade of the
on disk data for gmirror. That part went great.

We are, however, still struggling to autmatically switch the
active partititon after dd'ing an update to the inactive one:

new_server# uname -a
FreeBSD new_server 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct 30 14:49:14 CET 2009     root at nanobsd.ka.punkt.de:/var/home/nanobsd/obj/rx100s5-hosting/usr/src/sys/GENERIC  amd64
new_server# gmirror status
     Name    Status  Components
mirror/m0  COMPLETE  ad4
                     ad6
new_server# fdisk /dev/mirror/m0
******* Working on device /dev/mirror/m0 *******
parameters extracted from in-core disklabel are:
cylinders=30401 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=30401 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 16065, size 16418430 (8016 Meg), flag 0
	beg: cyl 1/ head 0/ sector 1;
	end: cyl 1022/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 16434495, size 16418430 (8016 Meg), flag 80 (active)
	beg: cyl 1023/ head 0/ sector 1;
	end: cyl 1020/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 32852925, size 455539140 (222431 Meg), flag 0
	beg: cyl 1021/ head 0/ sector 1;
	end: cyl 704/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>
new_server# mount
/dev/mirror/m0s2a on / (ufs, local, read-only)
devfs on /dev (devfs, local)
/dev/mirror/m0s3a on /etc (ufs, local)
/dev/mirror/m0s3d on /var (ufs, local, soft-updates)

That's the status of the system, now let's try to activate
partition 1:

new_server# sysctl kern.geom.debugflags=0x10
kern.geom.debugflags: 0 -> 16
new_server# boot0cfg -v -s1 /dev/mirror/m0
boot0cfg: /dev/mirror/m0: Geom not found: "m0"
boot0cfg: /dev/mirror/m0: ioctl DIOCSMBR: Operation not permitted

Now, what? This was discussed here, already, and I got the impression
that a solution was to be in RELENG_7:

http://lists.freebsd.org/pipermail/freebsd-stable/2008-August/044487.html

Tanks for any insight.
Patrick
-- 
punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
info at punkt.de       http://www.punkt.de
Gf: Jürgen Egeling      AG Mannheim 108285


More information about the freebsd-stable mailing list