benefit of GEOM labels for ZFS, was Hard drive device names... serial numbers

Charles Sprickman spork at bway.net
Mon Mar 4 16:37:59 UTC 2013


On Mar 4, 2013, at 5:38 AM, Daniel Kalchev wrote:

> What you do when the disk is dead, and you don't know which one it is in a rather big rack full of disks?
> 
> Perhaps, you offline each and every disk in the system until you eliminate all but one? :)

One thing that I recently discovered is led(4).

I have no idea how ubiquitous support for this is, but I see it on both a Supermicro and a Tyan board.  In /dev/led, things are labelled like so:

[spork at util2 ~]$ ls -l /dev/led/
total 0
crw-------  1 root  wheel    0,  40 Feb  9 00:20 ahcich0.fault
crw-------  1 root  wheel    0,  39 Feb  9 00:20 ahcich0.locate
crw-------  1 root  wheel    0,  42 Feb  9 00:20 ahcich1.fault
crw-------  1 root  wheel    0,  41 Feb  9 00:20 ahcich1.locate
crw-------  1 root  wheel    0,  44 Feb  9 00:20 ahcich2.fault
crw-------  1 root  wheel    0,  43 Feb  9 00:20 ahcich2.locate
crw-------  1 root  wheel    0,  46 Feb  9 00:20 ahcich3.fault
crw-------  1 root  wheel    0,  45 Feb  9 00:20 ahcich3.locate
crw-------  1 root  wheel    0,  48 Feb  9 00:20 ahcich4.fault
crw-------  1 root  wheel    0,  47 Feb  9 00:20 ahcich4.locate
crw-------  1 root  wheel    0,  50 Feb  9 00:20 ahcich5.fault
crw-------  1 root  wheel    0,  49 Feb  9 00:20 ahcich5.locate

If you pair that up with boot messages, you can probably sort out which drive is which:

[spork at util2 ~]$ grep "at ahcich1" /var/run/dmesg.boot 
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0

And then you can blink the "locate" LED on the sas/sata backplane:

root at util2:/home/spork # echo f > /dev/led/ahcich0.locate

And disable the blinking after you're done:

root at util2:/home/spork # echo 0 > /dev/led/ahcich0.locate

I'm sure this is all very hardware dependent, but if you have supported hardware, it's an easy way to find what's where.

Charles


> Hint: all disks die sooner or later.
> 
> Dnaiel
> 
> On 04.03.13 11:28, Peter Maloney wrote:
>> I just use zfs offline, then dd to read the disk, and pull the one that
>> blinks. :) zfs offline means the disk won't blink ever without me
>> causing it, so there's no confusion.
>> 
>> I would only use a labelling system if I could easily label the disks on
>> the front too, but I don't have small enough labels... the disks have
>> too much vent space, so I assume the labels would just fall off, block
>> airflow, and be a hassle. And the servers are local, so dd isn't a problem.
>> 
>> 
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"



More information about the freebsd-fs mailing list