Page MenuHomeFreeBSD

cam_periph: Add ability to wire units to a serial number
ClosedPublic

Authored by imp on Oct 27 2021, 5:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 10:23 PM
Unknown Object (File)
Mon, Apr 8, 1:34 AM
Unknown Object (File)
Mon, Apr 8, 12:35 AM
Unknown Object (File)
Feb 22 2024, 6:47 AM
Unknown Object (File)
Feb 10 2024, 11:58 PM
Unknown Object (File)
Feb 10 2024, 10:43 AM
Unknown Object (File)
Dec 27 2023, 5:48 PM
Unknown Object (File)
Dec 27 2023, 5:48 PM
Subscribers
None

Details

Summary

For scsi, ata and nvme, at least, we read a serial number from the
device (if the device supports it, some scsi drives do not) and record
it during the *_xpt probe device state machine before it posts the
AC_FOUND_DEVICE async event. For mmc, no serial number is ever
retrieved, so it's always NULL. Add the ability to match this serial
number during device wiring.

This mechanism is competely optional, and often times using a label
and/or some other attribute of the device is easier. However, other
times wiring a unit to a serial number simplifies management as most
monitoring tools require the *daX device and having it stable from boot
to boot helps with data continuity. It can be especially helpful for
nvme where no other means exists to reliably tie a ndaX device to an
underlying nvme drive and namespace.

A similar mechanism exists in Linux to mange device unit numbers with
udev.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable