Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/nvme-subsystem

FieldValue
SubsystemNVMe host driver; sibling of nvme (nvme.md cites drivers/nvme/host/core.c from master; implementation file not in cached tree)
Config gateCONFIG_NVME_MULTIPATH stated in ABI for iopolicy; class-level gate not stated in cached tree
ABI documentationDocumentation/ABI/stable/sysfs-nvme (six class-level What: entries at /sys/class/nvme-subsystem/)
Since4.15 (model, serial, firmware_rev, subsysnqn); iopolicy 5.1; subsystype 5.16
Live (5.10.134 host)class directory present, 0 devices (empty); no live value reads possible
Ledger IDSYSC-nvme-subsystem

What it represents

One directory per NVMe subsystem (nvme-subsysX) rather than per controller. A subsystem is the NVMe-level object that controllers connect to; with multipath fabrics several controllers can serve the same subsystem, so the identity attributes (model, serial, firmware_rev, subsysnqn) live here once, while per-controller state stays in nvme. Per-namespace files remain on the block devices covered by block.

Relationship to the device model

sysfs-nvme documents this class in the same file as /sys/class/nvme/nvmeX/ and /sys/block/nvmeXnY/, i.e. one ABI surface over three sysfs views. The class appears when the NVMe core has subsystems to expose; on this container the directory is present with zero entries. The iopolicy entry states the only Kconfig dependency in the cached text: it exists “Only available when CONFIG_NVME_MULTIPATH is enabled”.

Attributes

AttributeR/WUnit/formatConditional?Source
model, serial, firmware_rev, subsysnqnROidentify strings and subsystem NQN of the NVMe subsystemalwaysABI stable sysfs-nvme, 4.15
iopolicyRWmultipath I/O path selection: “numa”, “round-robin”, “queue-depth”; changing it clears all current path selectionsCONFIG_NVME_MULTIPATHABI stable sysfs-nvme, 5.1
subsystypeROsubsystem type: “discovery”, “nvm”, “reserved”alwaysABI stable sysfs-nvme, 5.16

The sysfs-attrs.json cache lists exactly these six paths for the class.

Safety and writes

Reads are safe. The one writable file is iopolicy: it changes path selection for live multipath I/O and, per the ABI, clearing current path selections affects in-flight I/O on storage a mounted filesystem may be using. On the 5.10.134 host there is nothing to read or write (0 subsystems); permission bits and value examples are unknown here and are not reported.

References

  • Documentation/ABI/stable/sysfs-nvme lines 425-453 (cached copy)
  • https://github.com/torvalds/linux/blob/master/Documentation/ABI/stable/sysfs-nvme
  • sysfs-attrs.json entry nvme-subsystem (6 paths)
  • Live enumeration: /sys/class/nvme-subsystem (empty, read-only, kernel 5.10.134)
  • Sibling pages: nvme, nvme-generic, block; coverage: ledger