From owner-freebsd-geom@FreeBSD.ORG Wed Feb 1 08:21:53 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49952106564A for ; Wed, 1 Feb 2012 08:21:53 +0000 (UTC) (envelope-from sascha@trimind.de) Received: from mikako.shopkeeper.de (mikako.shopkeeper.de [82.119.175.20]) by mx1.freebsd.org (Postfix) with ESMTP id 9FF118FC0A for ; Wed, 1 Feb 2012 08:21:52 +0000 (UTC) Received: from avalon.dobu.local (p508D4F8B.dip.t-dialin.net [80.141.79.139]) (authenticated bits=0) by mikako.shopkeeper.de (8.14.3/8.14.3) with ESMTP id q1182tMr057669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Feb 2012 09:02:57 +0100 (CET) (envelope-from sascha@trimind.de) Received: from avalon.dobu.local (localhost [127.0.0.1]) by avalon.dobu.local (8.14.5/8.14.2) with ESMTP id q1182qx2001133; Wed, 1 Feb 2012 09:02:54 +0100 (CET) (envelope-from sascha@avalon.dobu.local) Received: (from sascha@localhost) by avalon.dobu.local (8.14.5/8.14.5/Submit) id q0VEcIXg002396; Tue, 31 Jan 2012 15:38:18 +0100 (CET) (envelope-from sascha) Date: Tue, 31 Jan 2012 15:38:18 +0100 From: Sascha Klauder To: "Andrey V. Elsukov" Message-ID: <20120131143818.GA2320@trimind.de> References: <9DB745B1-AA3D-4EF4-9A5E-4159EBFBC3E7@kcilink.com> <4F277200.8020003@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F277200.8020003@yandex.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.97.2 at mikako.shopkeeper.de X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mikako.shopkeeper.de [82.119.175.20]); Wed, 01 Feb 2012 09:02:58 +0100 (CET) Cc: Vick Khera , freebsd-geom@freebsd.org Subject: Re: gmirror failed with error 19. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2012 08:21:53 -0000 On Tue, 2012-01-31 08:45 +0400, Andrey V. Elsukov wrote: > Usually the cause is that you have created the mirror after partition table. > And partition size stored in the partition table metadata is greater than available sectors > in this mirror. Now it is detected by the gpart's integrity checks and gpart on the mirror > refuses partition table. > > One way to fix the problem: > 1. Disable integrity checks: kern.geom.part.check_integrity=0 > 2. Detach one component from the mirror and destroy partition table on it. > 3. Create new mirror on this disk and recreate partition table ATOP of the mirror. > 4. dump+restore the data from old mirror to new one > 5. destroy old mirror and attach the disk to new mirror. Thanks for the followup and the explanation Andrey. I've just tried and found this method working fine when upgrading another identical configured system from 8.2 to 9.0. Given geom_mirror provider gm0 consisting of two disks ada0 and ada1, in short, here is what I did: # gmirror remove gm0 ada1 # dd if=/dev/zero of=/dev/ada1 bs=512 count=10 # gmirror label gm1 /dev/ada1 # gpart create -s gpt /dev/mirror/gm1 # gpart add -t freebsd-boot -l gptboot -s 128K /dev/mirror/gm1 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 /dev/mirror/gm1 # gpart add -t freebsd-ufs -l root -s 2G /dev/mirror/gm1 [adding other fs, newfs, dump/restore filesystems] [rebooting from disk ada1] # gmirror remove gm0 ada0 # dd if=/dev/zero of=/dev/ada0 bs=512 count=10 # gmirror insert gm1 /dev/ada0 The only problem so far is this warning message when booting: gptboot: invalid backup GPT header whereas gpart(8) "show", "status" and "list" does not indicate any problem. Is this caused by geom_mirror usage? Cheers, -sascha