From owner-freebsd-stable@FreeBSD.ORG Fri Oct 30 16:01:18 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF54C106570B for ; Fri, 30 Oct 2009 16:01:18 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) by mx1.freebsd.org (Postfix) with ESMTP id 66E808FC0A for ; Fri, 30 Oct 2009 16:01:17 +0000 (UTC) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [10.0.0.110]) by kagate2.punkt.de with ESMTP id n9UG1GUT021368 for ; Fri, 30 Oct 2009 17:01:16 +0100 (CET) Received: from hugo10.ka.punkt.de (localhost [127.0.0.1]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id n9UG1G7m083704 for ; Fri, 30 Oct 2009 17:01:16 +0100 (CET) (envelope-from ry93@hugo10.ka.punkt.de) Received: (from ry93@localhost) by hugo10.ka.punkt.de (8.14.2/8.14.2/Submit) id n9UG1GXU083703 for freebsd-stable@freebsd.org; Fri, 30 Oct 2009 17:01:16 +0100 (CET) (envelope-from ry93) Date: Fri, 30 Oct 2009 17:01:16 +0100 From: "Patrick M. Hausen" To: FreeBSD Stable Mailing List Message-ID: <20091030160115.GB81189@hugo10.ka.punkt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.17 (2007-11-01) Subject: boot0cfg and gmirror again X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2009 16:01:19 -0000 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@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: 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@punkt.de http://www.punkt.de Gf: Jürgen Egeling AG Mannheim 108285