From owner-freebsd-questions@freebsd.org Mon Jun 19 13:14:20 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 9BCD3D9CB1B for ; Mon, 19 Jun 2017 13:14:20 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E80E7423D for ; Mon, 19 Jun 2017 13:14:20 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id v5JDE92Z035734 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 19 Jun 2017 07:14:09 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id v5JDE7RH035636; Mon, 19 Jun 2017 07:14:09 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 19 Jun 2017 07:14:07 -0600 (MDT) From: Warren Block To: Frank Leonhardt cc: freebsd-questions@freebsd.org Subject: Re: Drive labelling with ZFS - is this even a good idea? In-Reply-To: <59414689.8080605@fjl.co.uk> Message-ID: References: <03643051-38e8-87ef-64ee-5284e2567cb8@fjl.co.uk> <7fa67076-3ec8-4c25-67b9-a1b8a0aa5afc@holgerdanske.com> <59414689.8080605@fjl.co.uk> User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (wonkity.com [127.0.0.1]); Mon, 19 Jun 2017 07:14:10 -0600 (MDT) 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: Mon, 19 Jun 2017 13:14:20 -0000 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.