From owner-freebsd-questions@FreeBSD.ORG Sun Jul 6 05:16:08 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 756D6AA6 for ; Sun, 6 Jul 2014 05:16:08 +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 25FF620D7 for ; Sun, 6 Jul 2014 05:16:07 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s665G6wa015673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 5 Jul 2014 23:16:06 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s665G5Gp015670; Sat, 5 Jul 2014 23:16:06 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 5 Jul 2014 23:16:05 -0600 (MDT) From: Warren Block To: Mike Clarke Subject: Re: Problem with "gpart add" In-Reply-To: <41313663.OOGA20ln3i@curlew.lan> Message-ID: References: <41313663.OOGA20ln3i@curlew.lan> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) 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]); Sat, 05 Jul 2014 23:16:06 -0600 (MDT) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 05:16:08 -0000 On Sat, 5 Jul 2014, Mike Clarke wrote: > > FreeBSD curlew.lan 9.1-RELEASE-p14 FreeBSD 9.1-RELEASE-p14 #0: Tue Jun > 3 08:56:12 UTC 2014 root@amd64- > builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > I'm experiencing problems setting up a partition in some free space > between two existing partitions on a drive: > > This is the current setup: > > curlew:/root# gpart show ada2 > => 63 625142385 ada2 MBR (298G) > 63 125829081 1 freebsd (60G) > 125829144 186731496 - free - (89G) > 312560640 312576705 2 ntfs (149G) > 625137345 5103 - free - (2.5M) > > I'd assumed that I could do this, but it fails > > curlew:/root# gpart add -t freebsd-zfs -b 125829144 -s 186731496 ada2 > gpart: Invalid argument > > What am I doing wrong? MBR is touchy about CHS values. It might be complaining about the starting location or size. Without those options, it should use all of the first available space, rounding for CHS values. So (after a backup) try: gpart add -t freebsd-zfs ada2 A 320G drive is not likely to use 4K blocks, but that's worth checking. Block misalignment is very easy with MBR, and can make for terrible write performance.