From owner-freebsd-geom@FreeBSD.ORG Wed Dec 12 02:28:07 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED4BA9C2 for ; Wed, 12 Dec 2012 02:28:07 +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 A45B78FC12 for ; Wed, 12 Dec 2012 02:28:07 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id qBC2S4Y0008467; Tue, 11 Dec 2012 19:28:04 -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 qBC2S3aD008464; Tue, 11 Dec 2012 19:28:04 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Tue, 11 Dec 2012 19:28:03 -0700 (MST) From: Warren Block To: Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: 4k alignment of MBR slices / BSD partitions is not working correctly In-Reply-To: <50C7D722.9090809@quip.cz> Message-ID: References: <50C7D722.9090809@quip.cz> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Tue, 11 Dec 2012 19:28:04 -0700 (MST) Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2012 02:28:08 -0000 On Wed, 12 Dec 2012, Miroslav Lachman wrote: > Next test with gpart -a 4k > > # gpart create -s mbr mirror/gm0 > mirror/gm0 created > > # gpart add -a 4k -s 40g -t freebsd mirror/gm0 > mirror/gm0s1 added > > # gpart show -p mirror/gm0 > => 63 1951475648 mirror/gm0 MBR (930G) > 63 63 - free - (31k) > 126 83886012 mirror/gm0s1 freebsd (40G) > 83886138 1867589573 - free - (890G) > > > Same wrong result as in previous test My possibly incorrect understanding of this is that the slice will start on a block that is aligned to the old CHS values for backwards compatibility. When gpart -a4k is used to create FreeBSD partitions inside that slice, those partitions will be 4K aligned.