It's now possible to get some NVMe controller/namespace information on #OpenBSD using bioctl(8).
krw@ modified src/sys/dev/ic/{nvme.c nvmereg.h,nvmevar.h}: Add bio(4) support to nvme(4). Provide information on controller and configured namespaces via bioctl(8)'s BIOCINQ, BIOCVOL, BIOCDISK requests.
Based on work with dlg@ at h2k23 and many subsequent improvements and tests by jmatthew@.
ok jmatthew@
e.g:
$ doas bioctl nvme0
nvme0: APPLE SSD AP0512Q, 359.60.3, 0ba0146283356426
nvme0: Max i/o 131072 bytes, Volatile Write Cache
nvme0: Commands FWCD,SDMGMT
nvme0: NVMe 1.1, NVM I/O command set, Enabled, Ready
Volume Status Size Device
nvme0 0 Online 500277792768 sd0 CONCAT
0: Formats *4096 (Best)
0 Online 500277792768 0:1.0 Namespace 1 <>
@brynet I'm anxiously awaiting this to land in github so I can fetch it with got!
Some useful NVMe SMART data, like temperature, available spare sectors, device endurance, is now exposed in #OpenBSD's sensors sysctl(8) framework.