Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2017 07:14:07 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Frank Leonhardt <frank2@fjl.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Drive labelling with ZFS - is this even a good idea?
Message-ID:  <alpine.BSF.2.21.1706160718300.67084@wonkity.com>
In-Reply-To: <59414689.8080605@fjl.co.uk>
References:  <03643051-38e8-87ef-64ee-5284e2567cb8@fjl.co.uk> <b99a9f4e-f00d-c6fa-e709-d19e07ccb98e@holgerdanske.com> <7fa67076-3ec8-4c25-67b9-a1b8a0aa5afc@holgerdanske.com> <59414689.8080605@fjl.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 14 Jun 2017, Frank Leonhardt wrote:

> On 14/06/2017 03:02, David Christensen wrote:
>> On 06/13/2017 04:32 PM, David Christensen wrote:
>>> Both [1] and [3] discuss the fact that a given drive, partition, file
>>> system, etc., can be identified in various ways, manual or automatic,
>>> but the kernel will pick one and "wither" the rest.  Once a GPT label is
>>> set manually, other methods should be disabled via settings in
>>> /boot/loader.conf and the system rebooted ([1] p. 35):
>>>
>>>     kern.geom.label.disk_ident.enable="0"
>>>     kern.geom.label.gptid.enable="0"
>> 
>> Beware that all your disks need to have GPT labels, and those labels need 
>> to be carried forward into /etc/fstab, etc., before you reboot, as the 
>> kernel won't be able to find the disks using Disk ID or GPT GUID labels 
>> once those methods are disabled.
>> 
>> 
>
> Hi David,
>
> It turns out that these options were set anyway. The problem turned out be be 
> that I was assuming that geom label played nice with GPT. It doesn't! Well it 
> does display labels set on GPT partitions, but it doesn't change them. It 
> took a look at the GPT blocks to confirm this. It does, however, mask the GPT 
> version with its own, sometimes, leading to much monkeyhouse.
>
> So ignore glabel completely and set the labels using gpart instead.

Yes. glabel uses the last block for metadata.  With GPT, the label is 
inside the partition data and does not take extra space.  Nor is it 
vulnerable to being overwritten when someone uses the partition device 
name (/dev/ada0p2) rather than the label name (/dev/label/whatever).

> Now FreeBSD 11.0 can flash the ident light on any drive you choose, by device 
> name (as used by ZFS), I'm seriously wondering if labels are worth the bother 
> if they can't be relied on. Consider what happen if a tech pulls two drives 
> and puts them back in the wrong order. ZFS will carry on regardless, but the 
> label will now identify the wrong slot. Dangerous!

Right.  This is why I question the reasoning behind static labels for 
location.  It's really a dynamic thing.



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