Date: Sun, 13 Jan 2013 08:30:43 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: kpneal@pobox.com Cc: freebsd-fs@freebsd.org Subject: Re: Using glabel Message-ID: <alpine.BSF.2.00.1301130806280.15715@wonkity.com> In-Reply-To: <20130113062702.GA63271@neutralgood.org> References: <CAG27QgTQFA2CvBSrH0Zid9oQg5RbmU55OvfP0njMoLpqHb_GTg@mail.gmail.com> <20130112200041.GA77338@psconsult.nl> <20130113062702.GA63271@neutralgood.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1301130806280.15715>