Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2013 19:21:52 +0100
From:      "Ronald Klop" <ronald-freebsd8@klop.yi.org>
To:        freebsd-fs@freebsd.org
Subject:   Re:  Using glabel
Message-ID:  <op.wqu3yqwn8527sy@ronaldradial.home>
In-Reply-To: <alpine.BSF.2.00.1301130806280.15715@wonkity.com>
References:  <CAG27QgTQFA2CvBSrH0Zid9oQg5RbmU55OvfP0njMoLpqHb_GTg@mail.gmail.com> <20130112200041.GA77338@psconsult.nl> <20130113062702.GA63271@neutralgood.org> <alpine.BSF.2.00.1301130806280.15715@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Jan 2013 16:30:43 +0100, Warren Block <wblock@wonkity.com>  
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.wqu3yqwn8527sy>