Date: Tue, 31 Jan 2012 15:38:18 +0100 From: Sascha Klauder <sascha@trimind.de> To: "Andrey V. Elsukov" <bu7cher@yandex.ru> Cc: Vick Khera <khera@kcilink.com>, freebsd-geom@freebsd.org Subject: Re: gmirror failed with error 19. Message-ID: <20120131143818.GA2320@trimind.de> In-Reply-To: <4F277200.8020003@yandex.ru> References: <9DB745B1-AA3D-4EF4-9A5E-4159EBFBC3E7@kcilink.com> <4F277200.8020003@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120131143818.GA2320>