From owner-freebsd-questions@freebsd.org Fri Jul 7 10:21:19 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F6E8D9FA0F for ; Fri, 7 Jul 2017 10:21:19 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from bs1.fjl.org.uk (bs1.fjl.org.uk [84.45.41.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bs1.fjl.org.uk", Issuer "bs1.fjl.org.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 65DD5749E2 for ; Fri, 7 Jul 2017 10:21:17 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from [192.168.1.35] (host86-191-88-133.range86-191.btcentralplus.com [86.191.88.133]) (authenticated bits=0) by bs1.fjl.org.uk (8.14.4/8.14.4) with ESMTP id v67ALE6m033551 for ; Fri, 7 Jul 2017 11:21:14 +0100 (BST) (envelope-from frank2@fjl.co.uk) Subject: Re: Drive labelling with ZFS - is this even a good idea? To: freebsd-questions@freebsd.org References: <03643051-38e8-87ef-64ee-5284e2567cb8@fjl.co.uk> <7fa67076-3ec8-4c25-67b9-a1b8a0aa5afc@holgerdanske.com> <59414689.8080605@fjl.co.uk> From: Frank Leonhardt Message-ID: Date: Fri, 7 Jul 2017 11:21:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 10:21:19 -0000 On 19/06/2017 14:14, Warren Block wrote: > 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. I'm glad it's not just me then! This is oft repeated advice taken from a popular book, much of which I've come to question over the last few weeks. Regards, Frank.