From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 14 11:47:30 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 8CCAD106564A for ; Fri, 14 Jan 2011 11:47:30 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2.mail.yandex.net (forward2.mail.yandex.net [77.88.46.7]) by mx1.freebsd.org (Postfix) with ESMTP id 245978FC19 for ; Fri, 14 Jan 2011 11:47:29 +0000 (UTC) Received: from smtp1.mail.yandex.net (smtp1.mail.yandex.net [77.88.46.101]) by forward2.mail.yandex.net (Yandex) with ESMTP id 4F9A138A8C80; Fri, 14 Jan 2011 14:47:28 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1295005648; bh=/F/WejxhpPOjX0GXfe0M42qkQrYSAU0a4UW5Axx2NY8=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=XMq1p04MwMTtfXa1/KwHJjCTbrlWBdmUmD3iOh8BPiyhB3LEQr/BYMl4pjAxJlYzR tqpeQ5lPOEAoCQGqe+izk2PfU3/4mntZuz8CaHDOg6zZoi9HfN3oc7wTwVpLBfF7wy w9/PVtwaeEbWcP6MnPv4LvRCXvACTUtusrvJ1iUs= Received: from [127.0.0.1] (ns.kirov.so-cdu.ru [77.72.136.145]) by smtp1.mail.yandex.net (Yandex) with ESMTPSA id 165D5290095; Fri, 14 Jan 2011 14:47:28 +0300 (MSK) Message-ID: <4D3037CC.1030901@yandex.ru> Date: Fri, 14 Jan 2011 14:47:24 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Daniel Braniss References: <4D302ACC.7010606@yandex.ru> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig796DC9FCBCDF02E77B675B44" 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:47:30 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig796DC9FCBCDF02E77B675B44 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 14.01.2011 14:33, Daniel Braniss wrote: >> 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. >=20 > 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 > =3D> 34 1952448444 label/r0 GPT (931G) > 34 128 1 freebsd-boot (64K) > 162 1952448316 - free - (931G) > =09 > =3D> 34 1952448444 mfid0 GPT (931G) [CORRUPT] > 34 128 1 freebsd-boot (64K) > 162 1952448316 - free - (931G) > danny It works as expected. Both providers label/r0 and mfid0 have primary GPT,= but label/r0 is one sector smaller than mfid0 and GPT's metadata is valid= only for label/r0. mfid0 marked as CORRUPT and you can not modify it. Please read RECOVERING section of gpart(8) manual page. --=20 WBR, Andrey V. Elsukov --------------enig796DC9FCBCDF02E77B675B44 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJNMDfPAAoJEAHF6gQQyKF63x0H/idIZRg6n5By3bjUEDp1Shdg dTeIhgc+8DJJ86dDHTocqKnYFCXVNcgqwF4o6Lth8i7ke4tqqqgYCUETRwyDqzX5 R6jCnib6/7I5q3ls15m/BfNVYO2XW6Tr4/5PcUmLylyhWQaaL/9Wm+KeS49m4IJ2 FYfhb0tLLt2pC+z+U0nAfgttlgYpuOzWnWMWDR1Y8VDwYYFPXHFb+EoZLaeEt0Wd pWy7PGbfN6/ZLPfuP6pZlGx6yxE/CWOCzqlpaDp7HuNagzDAJzOb3X0QAEMzry3f jhmKoZ3mO5Fsx5kXtIWPeiTZfPwZ1oDUpjIR0vwEXe6KMec4Dfzj3HrFEUDFeF0= =C7xZ -----END PGP SIGNATURE----- --------------enig796DC9FCBCDF02E77B675B44--