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)
Oct 1 2024, 5:05 AM
Unknown Object (File)
Sep 18 2024, 11:29 AM
Unknown Object (File)
Sep 18 2024, 6:11 AM
Unknown Object (File)
Sep 17 2024, 7:41 PM
Unknown Object (File)
Sep 15 2024, 4:54 PM
Unknown Object (File)
Sep 11 2024, 12:45 PM
Unknown Object (File)
Sep 8 2024, 8:58 AM
Unknown Object (File)
Sep 8 2024, 7:35 AM
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