Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2017 03:09:18 +0300
From:      Andrey Fesenko <f0andrey@gmail.com>
To:        Zaphod Beeblebrox <zbeeble@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: ZFS should prefer the most specific... or something.
Message-ID:  <CA%2BK5SrP=p7xqFOjPM4BvDuyitM951biu8ZNoKuin8A_TfeG1xQ@mail.gmail.com>
In-Reply-To: <CACpH0Meg5MjOGCohSMrAdwdRG_smVNY6CNVRaUSXw9cq0x2YsA@mail.gmail.com>
References:  <CACpH0Meg5MjOGCohSMrAdwdRG_smVNY6CNVRaUSXw9cq0x2YsA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 27, 2017 at 2:31 AM, Zaphod Beeblebrox <zbeeble@gmail.com> wrote:
> So, my experience is that I added two drives (that showed up as ada0 and
> ada1) ... something odd with the raid card added a da0 ... which is
> unreadable ... seems to be a bogon.
>
> ... and ZFS, in it's infinite wisdom changes my nice, neat da0s2a zfs to
> diskid/<blahblahblah>s2a.
>
> ... this is doubly bad, because then the /dev/da0s1a cannot mount as swap.
>
> I realize that this is can be somewhat fixed for non-root zfs with
> import/export, but for root ZFS ... you're stuck.
>
> Can we have ZFS prefer the shortest (rather than longest)?  Can we have it
> prefer labels, if they exist (have a priority field in the different types
> of geom ... an order in which they are tasted)?
>
> The current situation has been annoying multiple distinct times.

"A disk can be specified by a full path to the device or the geom(4)
provider name" see zpool(8)
For example gpt lables

gpart add -a 4k -t freebsd-zfs -l local0 da0
...

% zpool status localz1
    NAME            STATE     READ WRITE CKSUM
    localz1         ONLINE       0     0     0
      raidz1-0      ONLINE       0     0     0
        gpt/local1  ONLINE       0     0     0
        gpt/local2  ONLINE       0     0     0
        gpt/local0  ONLINE       0     0     0
    logs
      gpt/l2arc     ONLINE       0     0     0
    cache
      gpt/cache     ONLINE       0     0     0

Label or disk name may be changed if need after export/import (If I
remember it right)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BK5SrP=p7xqFOjPM4BvDuyitM951biu8ZNoKuin8A_TfeG1xQ>