From owner-freebsd-geom@FreeBSD.ORG Wed Dec 12 13:31:28 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 0AE42CAD for ; Wed, 12 Dec 2012 13:31:28 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id B416F8FC13 for ; Wed, 12 Dec 2012 13:31:27 +0000 (UTC) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 743892842A; Wed, 12 Dec 2012 14:31:20 +0100 (CET) Received: from [192.168.1.2] (unknown [89.177.49.69]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 24D7028428; Wed, 12 Dec 2012 14:31:19 +0100 (CET) Message-ID: <50C88726.4090105@quip.cz> Date: Wed, 12 Dec 2012 14:31:18 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.19) Gecko/20110420 Lightning/1.0b1 SeaMonkey/2.0.14 MIME-Version: 1.0 To: Warren Block Subject: Re: 4k alignment of MBR slices / BSD partitions is not working correctly References: <50C7D722.9090809@quip.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 13:31:28 -0000 Warren Block wrote: > 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. I understand that it is useful to have some backward compatibility with some really old systems, but I think it should be user's choice and not forced policy. And what is really confusing is that interactive fdisk allows it and non interactive not (more used by advanced users). So we have foot shooting for beginers and forced backward compatibility for advanced users disallowing restore of perfectly working setup from scripts etc. Not to mention that we don't need any compatibility with other (older) systems on servers where FreeBSD is the only OS used. It is something similar to allow more than 8 BSD partitions, which is not backward compatible with older FreeBSD releases or other systems using UFS with MBR+BSD partitions. > When gpart -a4k is used to create FreeBSD partitions inside that slice, > those partitions will be 4K aligned. OK, BSD partitions inside MBR slices are aligned. Miroslav Lachman