From owner-freebsd-geom@FreeBSD.ORG Sun Sep 13 22:59:44 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B46F1065679 for ; Sun, 13 Sep 2009 22:59:44 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 694298FC0A for ; Sun, 13 Sep 2009 22:59:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KPX00I2WMJIZE20@asmtp030.mac.com> for freebsd-geom@freebsd.org; Sun, 13 Sep 2009 15:59:44 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20090913183150.GA48701@dev.null> Date: Sun, 13 Sep 2009 15:59:42 -0700 Message-id: <16CD87F9-A772-4FD2-B4AB-118154A68575@mac.com> References: <20090913183150.GA48701@dev.null> To: Geoff Fritz X-Mailer: Apple Mail (2.1076) Cc: freebsd-geom@freebsd.org Subject: Re: gpart(8) not honoring sector sizes correctly? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2009 22:59:44 -0000 On Sep 13, 2009, at 11:31 AM, Geoff Fritz wrote: > I just recently started using gpart, and I ran into what I think might > be a bug. I'm using FreeBSD/amd64 8.0-BETA4 > > I have a geli provider with a 4096 sector size. When I issued a > "gpart add -s 1g -t freebsd_ufs ad0.eli" on this device, it appears > the command assumes a 512-byte sector size, resulting in a partition > that is 8G in size. The bsdlabel command handles this correctly, so I > assumed that gpart should. > > Is this a bug? It's a known limitation. The sector size is not known when parsing the arguments, so it's assumed to be standard. Just specify the size in sectors when the sector size is known not to be 512-bytes. > I only began messing with gpart after reading that it's related (I > think) to getting the new bsdlabel in FreeBSD 8.0 to utilize 26 > partitions (instead of the normal 8). Is there any documentation on > how to do this? Create the BSD disklabel as follows: gpart create -s bsd -n 26 FYI, -- Marcel Moolenaar xcllnt@mac.com