Date: Tue, 13 Jun 2017 16:32:14 -0700 From: David Christensen <dpchrist@holgerdanske.com> To: freebsd-questions@freebsd.org Subject: Re: Drive labelling with ZFS Message-ID: <b99a9f4e-f00d-c6fa-e709-d19e07ccb98e@holgerdanske.com> In-Reply-To: <03643051-38e8-87ef-64ee-5284e2567cb8@fjl.co.uk> References: <03643051-38e8-87ef-64ee-5284e2567cb8@fjl.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/13/2017 02:52 PM, Frank Leonhardt wrote:
> Can anyone help me? I'm going quietly crazy here with FreeBSD 11-RELEASE
>
> If you're creating a non-trivial ZFS raidz zpool, I've heard it said
> that labelling the GPT partitioned drives with their shelf and row
> number is A Good Thing. (I'm not talking about sticky labels stuck on
> the drive, but they're good too). When you look at a healthy zpool
> status you get a list of all the GEOMs, but when one fails it's
> identified by the GUID and not the device. Good luck tracking it down
> from that piece of information, unless it's also making a strange
> buzzing noise.
>
> So I though I'd just use use glabel label to set a label on the vdev
> (e.g "/dev/da7p3") and zpool would use that instead. Nope; only the
> GUID. I also, naively, thought that setting the label would cause it to
> appear as a device in /dev/gpt/
>
> What have I not understood?
>
> I have a theory - label the partitions before creating the zpool, and
> add them to the zpool afterwas by a /dev/gpt/ name. Except I have lost
> confidence that the label would appear in /dev/gpt/. It could be that
> /dev/gpt names don't appear if they're part of a zpool.
>
> However, testing this theory is going to involve hassle (i.e. the
> destruction and rebuilding of the entire zpool) so if anyone could tell
> me if I'm heading in the right direction I'd appreciate it. I may well
> have missed something trivial here.
>
> Thanks, Frank.
[1] pp. 30-35 and [3] pp. 4-8 discuss various choices for labels, and
recommend meaningful GPT label strings set manually by the
administrator. For example, [3] p. 6:
# gpart add -t freebsd-zfs -l zfs-mirror-1 da2
If you've used GPT partitioning on the drives in your zpool, it might be
possible to add GPT labels now. For example, [3] p. 6:
# gpart modify -i 2 -l f01-serialnum da2
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"
I'd suggest experimenting with USB flash drives on another machine.
David
[1] Michael W. Lucas, 2014, "FreeBSD Mastery: Storage Essentials",
https://www.michaelwlucas.com/os/fmse
[2] Michael W. Lucas & Allan Jude, 2015, "FreeBSD Mastery: ZFS",
https://www.michaelwlucas.com/os/fmzfs
[3] Allan Jude & Michael W. Lucas, 2015, "FreeBSD Mastery: Advanced
ZFS", https://www.michaelwlucas.com/os/fmaz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b99a9f4e-f00d-c6fa-e709-d19e07ccb98e>
