Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2019 08:29:08 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        Michael Gmelin <grembo@freebsd.org>, Kurt Jaeger <lists@opsec.eu>, Toomas Soome <tsoome@me.com>,  FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   Re: Lockdown adaX numbers to allow booting ?
Message-ID:  <CAOjFWZ6O4H9atcV-C-ZV0xye24P%2B69frgaVez98ZiGytzweOuw@mail.gmail.com>
In-Reply-To: <20190920143531.GB38096@zxy.spb.ru>
References:  <20190919140219.GE2863@home.opsec.eu> <7E0AE025-596C-457E-BC40-41217857A3CD@me.com> <20190919155713.GG2863@home.opsec.eu> <3C855A39-BF79-4430-98CB-CB9174768E11@freebsd.org> <20190920143531.GB38096@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 20, 2019 at 7:35 AM Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:

> On Thu, Sep 19, 2019 at 06:04:54PM +0200, Michael Gmelin wrote:
> > What about gpart output of the pool drives?
> >
> > In general you would create zpools using gptids or gpt labels, not the
> devices, so you=E2=80=99re independent of device numbering. The boot load=
er should
> only be installed on drives that contain the boot pool (maybe you have ol=
d
> boot loaders on data drives?).
>
> ZFS work w/ ZFS labels, not w/ device names/gptids/gpt labels.
> You don't worry about changed device names aroud reboots.
>

Very true, from ZFS' point of view.  It writes a ZFS label to whichever
GEOM provider you hand it (file, iSCSI device, raw device, MBR partition,
GPT partition, etc), and it will find it's pool members based on those
labels.  ZFS doesn't care where the device is physically connected in the
system, just that it is connected.

But the ZFS labels aren't what it will display in "zpool list -v" or "zpool
status" output.  That will show the GEOM provider you gave it (and,
depending on the order that GEOM tastes the devices, and what's
enabled/disabled in loader.conf, that output can change).  That's where
it's useful to have human-readable, descriptive labels (like GPT partition
labels), and to disable all the GEOM ID systems you won't be using via
loader.conf.  So that when things go sideways, and a disk dies, you can
find it quickly and easily.  Much easier to replace "gpt/jbod3-a6" in a
multi-chassis storage system with 100+ drives than to figure out which bay
corresponds to "ada73" after a couple of reboots that may or may not have
changed the PCI bus enumeration direction, or after replacing an HBA that
enumerates drives a different way (da vs ada), or after a BIOS/EFI upgrade
that renumbers things, or any other number of situations.  (We've run into
most of these, and have come to rely on GPT partition labels for just this
reason; and we stick the drive serial number on the outside of the bay,
just in case).

It's not a ZFS requirement.  It just makes things easier for the admin down
the road. Especially if the admin team changes or inherits systems.  :)

--=20
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ6O4H9atcV-C-ZV0xye24P%2B69frgaVez98ZiGytzweOuw>