10.1 geom "diskid"

Alan Somers asomers at freebsd.org
Wed Nov 19 16:01:52 UTC 2014

On Wed, Nov 19, 2014 at 8:40 AM, Patrick M. Hausen <hausen at punkt.de> wrote:
> Hi, all,
> next question, sorry. I just created a fresh 10.1 installation
> with ZFS. With the last reboot after adding dedicated SSD
> based l2arc and zil, the underlying devices are referred to
> by "diskid" instead of the GPT labels I have first been using:
>         NAME                                STATE     READ WRITE CKSUM
>         zroot                               ONLINE       0     0     0
>           mirror-0                          ONLINE       0     0     0
>             gpt/disk0                       ONLINE       0     0     0
>             gpt/disk1                       ONLINE       0     0     0
>         logs
>           diskid/DISK-BTTV334403R7200GGNp2  ONLINE       0     0     0
>         cache
>           diskid/DISK-BTTV334403R7200GGNp1  ONLINE       0     0     0
> I can live with that, but I do not understand why the ada2 device
> changed from gpt/* to diskid/* while the others did not?
> /dev/gpt entries are not even present for ada2, neither are ada2p?
> At least the system could try to be consistent ;-)

When ZFS imports a pool, it tries to open each vdev by name.  If it
can't find the vdev's name, or if that devname now refers to some
other provider, then ZFS searches through every geom provider to find
the ones with the right label.  Sometimes it finds /dev/da* first,
sometimes it finds /dev/gpt/* first, and sometimes it finds
/dev/diskid/* first.  That's why it seems inconsistent.

If you want to force some consistency, you can set these tunables in
/boot/loader.conf.local.  That way ZFS will only be able to use the
/dev/da* and /dev/ada* devnames.

Or, if you specify the /dev/diskid/* or /dev/gpt/* devnames in the
zpool create command, then those devnames should get written to the
label, and ZFS will always use them when it imports a pool.  At least,
I think that it will.  I haven't tested it myself.


More information about the freebsd-stable mailing list