help adding device serial numbers to /dev namespace?

Marius Nünnerich marius at
Sat Nov 28 16:29:13 UTC 2009

On Sat, Nov 28, 2009 at 01:18, James R. Van Artsdalen
<freebsd-geom at> wrote:
> Can anyone give me suggestions on how to implement putting disk driver
> serial numbers in the /dev namespace, much as UFS ID's are put there now?
> I want to propose adding the disk drive's hardware serial number, i.e.,
> for this
> # camcontrol identify ada0
> pass0: <ST3750640AS 3.AAJ> ATA/ATAPI-7 SATA 1.x device
> pass0: 150.000MB/s transfers
> protocol              ATA/ATAPI-7 SATA 1.x
> device model          ST3750640AS
> firmware revision     3.AAJ
> serial number         3QD0NWQT
> ...
> I would add a name like /dev/serialnum/3QD0NWQT.  This differs from the
> current name schemes I know of in that it describes the whole disk and
> not any particular partition or region, and no on-disk storage is needed.
> I think this needs to be done in GEOM, as a result of disk_create() and
> using d_ident, but I'm getting lost and need some guidance to do an
> example patch to "formally" propose the idea.
> The immediate use today is for ZFS.

If I remember correctly ivoras@ already proposed a patch like this.

More information about the freebsd-geom mailing list