Jul 242018

While the standard FreeBSD disk device enumeration found under /dev/sd* works just fine, I always found the serial number irreplaceable.

Not only it doesn’t depend on the ordering of SATA cables but it also ensures you don’t delete drive on the wrong machine. If you dd if=/dev/zero of=/dev/sda, you better be sure you’re on the correct machine. On the other hand, if you run dd if=/dev/zero of=/dev/diskid/DISK-SERIAL-123 on the wrong machine, you will just see an error telling you the device was not found. Much better.

But I don’t have /dev/diskid/, I hear you complain. XigmaNAS, as pretty much any FreeBSD system by default needs a slight modification to track disks this way.

To turn it on, go to System, Advanced, and loader.conf tab. There add kern.geom.label.disk_ident.enable=1 and reboot. Once system has started again, all your disks will have their entry in /dev/diskid/*.

  One Response to “Enabling Disk ID (/dev/diskid/*) on XigmaNAS”

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.