From owner-freebsd-fs@FreeBSD.ORG Sun Jan 13 18:22:00 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 32AB7776 for ; Sun, 13 Jan 2013 18:22:00 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.78]) by mx1.freebsd.org (Postfix) with ESMTP id BF8BC2B1 for ; Sun, 13 Jan 2013 18:21:59 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TuSBq-0000tX-Ku for freebsd-fs@freebsd.org; Sun, 13 Jan 2013 19:21:52 +0100 Received: from h253044.upc-h.chello.nl ([62.194.253.44] helo=ronaldradial.home) by smtp.greenhost.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TuSBq-0005Gi-PY for freebsd-fs@freebsd.org; Sun, 13 Jan 2013 19:21:50 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-fs@freebsd.org Subject: Re: Using glabel References: <20130112200041.GA77338@psconsult.nl> <20130113062702.GA63271@neutralgood.org> Date: Sun, 13 Jan 2013 19:21:52 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.12 (Win32) X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: 0.8 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.1 X-Scan-Signature: c09395f469c52153b963e4ff2d10f427 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2013 18:22:00 -0000 On Sun, 13 Jan 2013 16:30:43 +0100, Warren Block wrote: > On Sun, 13 Jan 2013, kpneal@pobox.com wrote: > >>> You can use glabel to label your disks or partition the disks with >>> gpart >>> (using the GPT scheme) and let gpt put a label on each (-l flag). >> >> Don't use glabel pretty much ever. It stores the label inside the >> partition (or disk). If the end of the partition is ever touched then >> the label goes *poof*. Stick to gpt labels. > > If you label a partition, the label device will be one block smaller in > size. The metadata is hidden and safe, as long as it is accessed > through the label device. > > # diskinfo -v /dev/da0p1 > /dev/da0p1 > 512 # sectorsize > 512000 # mediasize in bytes (500k) > 1000 # mediasize in sectors > > # glabel label teeny /dev/da0p1 > # diskinfo -v /dev/label/teeny > /dev/label/teeny > 512 # sectorsize > 511488 # mediasize in bytes (499k) > 999 # mediasize in sectors > > Note the size in sectors. The problem is that sometimes people don't > realize that the label device (/dev/label/teeny) is offering those extra > features and will continue to use the raw partition in newfs commands > and such. > > Anyway, GPT labels are still preferable to glabel because they can be > created at the same time as partitions and don't use any extra metadata. > > ZFS has its own metadata, and newer versions are supposed to leave the > last megabyte or so unused to allow for actual versus nominal disk > sizes. I'm not clear whether there's a good reason to use additional > labels instead of just giving ZFS the whole disk. Unless you aren't > planning on using the whole disk for ZFS, of course. Gpt labels are also portable between different OS'es. If you ever want to import your pool with OpenSolaris or the more recent forks of OpenSolaris they will understand gpt. Glabel is FreeBSD only. Ronald.