From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 2 12:50:29 2014 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE1D729F; Mon, 2 Jun 2014 12:50:29 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B763213E; Mon, 2 Jun 2014 12:50:29 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.8/8.14.8) with ESMTP id s52CoLAg007403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Jun 2014 06:50:21 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.8/8.14.8/Submit) with ESMTP id s52CoLiY007400; Mon, 2 Jun 2014 06:50:21 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 2 Jun 2014 06:50:21 -0600 (MDT) From: Warren Block To: "Andrey V. Elsukov" Subject: Re: fdisk(8) vs gpart(8), and gnop In-Reply-To: <538C6795.9080005@FreeBSD.org> Message-ID: References: <20140601004242.GA97224@bewilderbeast.blackhelicopters.org> <20140601020053.GR43976@funkthat.com> <1401632369.20883.51.camel@revolution.hippie.lan> <538C6795.9080005@FreeBSD.org> 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.4.3 (wonkity.com [127.0.0.1]); Mon, 02 Jun 2014 06:50:21 -0600 (MDT) Cc: John-Mark Gurney , hackers@FreeBSD.org, "Michael W. Lucas" , Ian Lepore , Marcel Moolenaar X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 12:50:29 -0000 On Mon, 2 Jun 2014, Andrey V. Elsukov wrote: > On 01.06.2014 18:36, Warren Block wrote: >> Thread starts here: >> http://lists.freebsd.org/pipermail/freebsd-geom/2014-February/005835.html >> >>> For the longest time geom would warn about "geometry does not match >>> label" that had something to do with different parts of the code >>> calculating different CHS values. Eventually it was decided to remove >>> the unactionable message, and my vague memory is that the justification >>> was basically "because CHS is meaningless to geom and modern BIOSen." >>> >>> If there's some "it would cause problems on this ancient hardware that >>> only 3 people in the world use" (I'm usually one of those people -- we >>> support some old equipment in the field at $work), then maybe there >>> could be a flag that enables the old CHS alignment behavior. >> >> Short form of above: gpart is supposed to hide and handle underlying >> GEOM issues, so it needs an override to be able to create these >> "non-standard" MBRs with slices aligned to arbitrary values. > > Hello, > > I propose add a sysctl variable kern.geom.part.mbr.enforce_chs which is > set by default. Merge it to all branches, then change it to zero in > head/. User could change it when he wants to use alignment to 4k. > And if there is no objections against this, I can do it. That's an interesting idea! If set, and the user asks for an alignment that is not allowed with CHS, gpart can mention that sysctl in the error message.