From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 14 11:33:49 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 927C1106566B for ; Fri, 14 Jan 2011 11:33:49 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4EE8FC08 for ; Fri, 14 Jan 2011 11:33:49 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1Pdhud-000MyD-MM; Fri, 14 Jan 2011 13:33:47 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: "Andrey V. Elsukov" In-reply-to: <4D302ACC.7010606@yandex.ru> References: <4D302ACC.7010606@yandex.ru> Comments: In-reply-to "Andrey V. Elsukov" message dated "Fri, 14 Jan 2011 13:51:56 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 14 Jan 2011 13:33:47 +0200 From: Daniel Braniss Message-ID: Cc: freebsd-hackers@freebsd.org Subject: Re: more gpart/glabel problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 11:33:49 -0000 > On 14.01.2011 13:37, Daniel Braniss wrote: > > and on the console: > > GEOM: mfid0: the secondary GPT table is corrupt or invalid. > > GEOM: mfid0: using the primary only -- recovery suggested. > > GEOM: mfid0: the secondary GPT table is corrupt or invalid. > > GEOM: mfid0: using the primary only -- recovery suggested. > > GEOM: label/r0: corrupt or invalid GPT detected. > > GEOM: label/r0: GPT rejected -- may not be recoverable. > > > > BTW, going the MBR way, it works as expected. > > > > so what am I doing wrong? > > GLABEL saves his metadata in the last sector of the given provider > where secondary GPT is located. You can label mfid0 with glabel and > after that create GPT on top of label/r0. This should work. I guess 'should' is the right word, because it doesn't :-) # glabel label r0 mfid0 # gpart create -s GPT label/r0 label/r0 created but on console: GEOM: mfid0: the secondary GPT header is not in the last LBA next: # gpart add -b 34 -s128 -t freebsd-boot $d on console: more of the same, and # gpart show => 34 1952448444 label/r0 GPT (931G) 34 128 1 freebsd-boot (64K) 162 1952448316 - free - (931G) => 34 1952448444 mfid0 GPT (931G) [CORRUPT] 34 128 1 freebsd-boot (64K) 162 1952448316 - free - (931G) danny