I've got FreeBSD 10.1 installed on a ZFS array. I intended to use labels which reference the position of the disks in the chassis. When I built the array the labels worked, but after a reboot these reverted to the gptid-numbers. I've tried failing, replacing and removing disks, but ZFS insists on reverting to gptid.
I've formatted and labelled the disks as such. The commands were cobbled together from various sources when I installed my 10.0 server last year, so I just copied them from the reference manual I wrote for myself:
Which I've then added to the array (in this case a replacement disk):
And after a reboot:
I don't understand why it is doing this. For this pool it is just a cosmetic problem but I'm about to set up a new storage array, and I'd like persistent labels there.
Can someone tell me what I'm doing wrong, and how to avoid it for the new array? I know it is possible, as a similar (evidently not identical) setup works like a charm on my older server.
I've formatted and labelled the disks as such. The commands were cobbled together from various sources when I installed my 10.0 server last year, so I just copied them from the reference manual I wrote for myself:
Code:
atlas# gpart destroy -F /dev/ada1
ada1 destroyed
atlas# gpart create -s gpt ada1
ada1 created
atlas# gpart add -s 100 -a 4k -t freebsd-boot -l boot0 ada1
ada1p1 added
atlas# gpart add -a 4k -t freebsd-zfs -l disk0 ada1
ada1p2 added
atlas# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
bootcode written to ada1
atlas# gnop create -S 4096 /dev/gpt/disk0
atlas# glabel label R1D1 /dev/gpt/disk0.nop
Which I've then added to the array (in this case a replacement disk):
atlas# zpool replace system /dev/gptid-bla label/R1D1
. There's the usual re-silver, but the end result is:
Code:
NAME STATE READ WRITE CKSUM
system ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
label/R1D1 ONLINE 0 0 0
gptid/91d29b30-6509-11e4-aad4-00259086be9a ONLINE 0 0 0
And after a reboot:
Code:
NAME STATE READ WRITE CKSUM
system ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
gptid/8d5ac7df-7d21-11e4-bf6a-00259086be9a ONLINE 0 0 0
gptid/91d29b30-6509-11e4-aad4-00259086be9a ONLINE 0 0 0
I don't understand why it is doing this. For this pool it is just a cosmetic problem but I'm about to set up a new storage array, and I'd like persistent labels there.
Can someone tell me what I'm doing wrong, and how to avoid it for the new array? I know it is possible, as a similar (evidently not identical) setup works like a charm on my older server.