From owner-freebsd-stable@FreeBSD.ORG Thu Jul 22 05:06:02 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEEB21065677 for ; Thu, 22 Jul 2010 05:06:01 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 76DFA8FC08 for ; Thu, 22 Jul 2010 05:06:01 +0000 (UTC) Received: by wwe15 with SMTP id 15so2687612wwe.31 for ; Wed, 21 Jul 2010 22:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AzJLoSvVyzxsCUzQp/WWZ3wPPzW7Pof//6lVCBKha8I=; b=Mfsc+4ElJgjThjMZsxsZ+AjjhGEk6lX4OvD1fDxoeLp/HmfkiLhALDuQ4rtE8OIdA7 A6q7khwnvuSdelHGOGeFAaVDiE1Dfrs6aR1B9tVPAyukJQ7ArR5bIvqHrfBS2eNJPAmI +kuU/g/BSJx3Nhic4ZkWGqVB0I/CNUDlfiUVs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=L47uGF9CmDt/TxfJAL0OQF/7gj56ZO3jtup+nP1tMN//pe+vDreZTX58XUm4eB6PXT rPApW+rmqEfSApH0niTePq+V8Opu5ENS61CoTR03L6pzpzadW1EageDfxL9T2qRRrecL T/uBDUEktUsSzKc5ovBhAkyC3UygHXo2M5TaQ= MIME-Version: 1.0 Received: by 10.216.10.5 with SMTP id 5mr1244204weu.81.1279775160346; Wed, 21 Jul 2010 22:06:00 -0700 (PDT) Received: by 10.216.231.142 with HTTP; Wed, 21 Jul 2010 22:06:00 -0700 (PDT) In-Reply-To: <4C47B57F.5020309@langille.org> References: <4C47B57F.5020309@langille.org> Date: Thu, 22 Jul 2010 00:06:00 -0500 Message-ID: From: Scot Hetzel To: Dan Langille Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-stable Subject: Re: Using GTP and glabel for ZFS arrays X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 05:06:02 -0000 On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille wrote: > I hope my terminology is correct.... > > I have a ZFS array which uses raw devices. =A0I'd rather it use glabel an= d > supply the GEOM devices to ZFS instead. =A0In addition, I'll also partiti= on > the HDD to avoid using the entire HDD: leave a little bit of space at the > start and end. > > Why use glabel? > > =A0* So ZFS can find and use the correct HDD should the HDD device ever > =A0 get renumbered for whatever reason. =A0e.g. /dev/da0 becomes /dev/da6 > =A0 when you move it to another controller. > > Why use partitions? > > =A0* Primarily: two HDD of a given size, say 2TB, do not always provide > =A0 the same amount of available space. =A0If you use a slightly smaller > =A0 partition instead of the entire physical HDD, you're much more > =A0 likely to have a happier experience when it comes time to replace an > =A0 HDD. > > =A0* There seems to be a consensus amongst some that leaving the start an= d > =A0 and of your HDD empty. =A0Give the rest to ZFS. > > Things I've read that led me to the above reasons: > > * > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D399538+0+current/freebsd-s= table > * > http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.ht= ml > * http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html > > The plan for this plan, I'm going to play with just two HDD, because that= 's > what I have available. =A0Let's assume these two HDD are ad0 and ad1. =A0= I am > not planning to boot from these HDD; they are for storage only. > > First, create a new GUID Partition Table partition scheme on the HDD: > > =A0gpart create -s GPT ad0 > > > Let's see how much space we have. =A0This output will be used to determin= e > SOMEVALUE in the next command. > > =A0gpart show > > > Create a new partition within that scheme: > > =A0gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0 > Instead of using glabel to label the partition on a GPT disk, use this command instead: gpart add -b 34 -s SOMEVALUE -t freebsd-zfs -l disk00 ad0 You will then see a /dev/gpt/disk00. Then to create the zpool use: zpool create bigtank gpt/disk00 gpt/disk02 ... Scot