Using glabel

Tim Gustafson tjg at soe.ucsc.edu
Sat Jan 12 05:13:35 UTC 2013


Hi,

We have a few servers with 45 disks each.  It gets a bit cumbersome at
the moment to map a failed drive (reported via "zpool status") to a
physical device.  The physical devices are labeled with serial
numbers, and ZFS reports device nodes.  I was wondering if I could use
"glabel" to label each of the disks we have with their serial number
to make identification easier, and then reconfigure the zpool to
import the drives by gptid, rather than device node.

So, my thinking was along the lines of:

- obtain the device serial numbers, probably using smartctl
- zpool export tank
- glabel -v SERIAL-NUMBER-0 /dev/ada0
- glabel -v SERIAL-NUMBER-1 /dev/ada1
- glabel -v SERIAL-NUMBER-2 /dev/ada2
- snip 43 more glabel lines
- zpool import tank -d /dev/gptid

Is there any reason that this is a bad idea?  Do I have the command
sequence correct?

-- 

Tim Gustafson
tjg at soe.ucsc.edu
831-459-5354
Baskin Engineering, Room 313A


More information about the freebsd-fs mailing list