Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2015 13:14:27 +0100
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        Quartz <quartz@sneakertech.com>, Aleksandr Miroslav <alexmiroslav@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ZFS: zdev names don't match devices
Message-ID:  <55A25A23.800@qeng-ho.org>
In-Reply-To: <55A03DB2.3020407@sneakertech.com>
References:  <CACcSE1y90LKs7h2Dc%2BnaDOdmzVTf6zt9X1Au7YC-QBjVi0v5cg@mail.gmail.com> <55A03DB2.3020407@sneakertech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/07/2015 22:48, Quartz wrote:
>> Did I screw
>> up my zfs setup?
>
> No. This is a quirk of the way the 10.x installer/ZFS works. There are a
> handful of different ways to identify a disk on FreeBSD besides the
> device ID, including UUIDs and gpt labels and such. Device IDs will
> change if you ever add/remove/reorder the physical drives, so the
> installer uses the other methods to be safer. I don't know why it uses a
> mix instead of doing the same thing for each drive though.

I've been bitten by the fact that disk partitions can have several names 
before. Depending on the exact set up the same partition could be called 
some or all of /dev/ada0p3, /dev/gpt/$gptlabel, /dev/gptid/$uuid, 
/dev/diskid/DISK-${disklabel}p3 or /dev/ufs/$ufslabel. ZFS pool 
importing seems to pretty much randomise which forms get used.

Personally I prefer to use partition names of the form /dev/gpt/xx-label 
where xx- is a per machine and disk prefix so I can move disks between 
machines without confusion in case of problems.

I haven't actually got round to trying this yet, but the appearance the 
various forms of partition name under /dev seem to be controlled by the 
kern.geom.label.xxx.enable sysctls. Thus if you wish to see the /dev/gpt 
forms and not have ZFS grab some alternate name, try putting

kern.geom.label.gptid.enable=0
kern.geom.label.disk_ident.enable=0

into /boot/loader.conf

-- 
Those who do not learn from computing history are doomed to
GOTO 1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55A25A23.800>