From owner-freebsd-stable@FreeBSD.ORG Fri Feb 17 04:55:46 2012 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 08D86106564A for ; Fri, 17 Feb 2012 04:55:46 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id C84318FC0A for ; Fri, 17 Feb 2012 04:55:45 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q1H4tc9G049157; Thu, 16 Feb 2012 21:55:38 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q1H4tco9049154; Thu, 16 Feb 2012 21:55:38 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Thu, 16 Feb 2012 21:55:38 -0700 (MST) From: Warren Block To: Jeremy Chadwick In-Reply-To: <20120217030806.GA62601@icarus.home.lan> Message-ID: References: <20120213195554.O46120@sola.nimnet.asn.au> <092c01cceb40$2dc8f240$895ad6c0$@fisglobal.com> <095a01cceb54$04a38fb0$0deaaf10$@fisglobal.com> <4F3ACDE7.8060003@bit0.com> <4F3D9A7C.7080900@quip.cz> <20120217001829.GA59869@icarus.home.lan> <20120217021019.GA61420@icarus.home.lan> <20120217030806.GA62601@icarus.home.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Thu, 16 Feb 2012 21:55:38 -0700 (MST) Cc: freebsd-stable@freebsd.org, Mike Andrews , Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: New BSD Installer 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, 17 Feb 2012 04:55:46 -0000 On Thu, 16 Feb 2012, Jeremy Chadwick wrote: > On Thu, Feb 16, 2012 at 07:40:35PM -0700, Warren Block wrote: >> On Thu, 16 Feb 2012, Jeremy Chadwick wrote: >> >>> On Thu, Feb 16, 2012 at 06:34:53PM -0700, Warren Block wrote: >> >> (...Linux mdadm) >>> So for version 0.90 of their metadata format, you lose drive capacity by >>> about 64-128KBytes, given that the space is needed for metadata. For >>> version 1.0, I'm not sure. For version 1.1 it looks like the metadata >>> can be stored at the beginning. >>> >>> So overall, this sounds to me like the equivalent of if GEOM was to >>> "lie" about the actual capacities of the devices when using classes that >>> require use of metadata (gmirror, etc.). >> >> Sorry, I may be misunderstanding your point. GEOM classes don't >> lie, they accurately represent the space. The space provided by a >> gmirror is one block less than the actual space occupied, to allow >> for the metadata block at the end. The problem is that GPT puts >> backup partition tables at the end of the physical (not logical) >> device. Create a GEOM device on that drive, and the GEOM metadata >> overwrites the backup GPT partition table. Well, the last block of >> it, anyway. >> >> But create the GEOM device inside a GPT partition that spans the >> drive, and things are fine. The GPT backup tables are safely >> outside the GEOM metadata, which is safely outside of the data. > > I wasn't aware you could do that. I was only aware that it was the > other way around. That (my) misconception seems to also be relayed > by others such as Miroslav who said: > >>> GPT doesn't play nice with GEOM classes which store their metadata >>> on last sector. For example, you can't use gmirror of a whole drives >>> and use GPT on top of this mirror. (and gmirror is not the only one) > > So if I read this correctly, it means that the erroneous behaviour is > the result of someone doing things "in the wrong order" (for lack of > better terminology). Yes, or the misconception that GPT behaves the same way as GEOM classes. (Which isn't helped by both "GPT" and "gpart" coincidentally starting with a "g".) > However, with the methodology you describe (GEOM device inside a GPT > partition), are our bootloader bits (BTX, etc.) smart enough to figure > this out and thus be able to boot/load kernel/so forth from such a > device? gptboot does not see the mirror, but will boot from one of the mirrored drives. Since the drives are identical, that works. A smart boot loader that could handle other GEOM classes is possible. One disadvantage is that identical partitions have to be created manually on both drives and then mirrored rather than creating a mirror and creating a single set of partitions on it. ae@ has an article on GPT and gmirror: http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=auto&tl=en&u=http%3A%2F%2Fbu7cher.blogspot.com%2F2011%2F03%2Ffreebsd-gmirror-gpt-ufs.html&act=url And so do I: http://www.wonkity.com/~wblock/docs/html/gmirror.html