freenode
Kernel & Low-Level

Linux SCSI gains native multipath as dm-mpath alternative

John Garry’s v6 series groups ALUA-capable paths into multipath-aware SCSI disks with in-kernel failover and I/O policies.

John Garry has posted the sixth revision of a large patch series that adds native multipath support to the Linux SCSI stack, intended as an alternative to device-mapper multipath (dm-mpath).

The design exposes a multipath-enabled SCSI block device that aggregates paths sharing a unique identifier from VPD page 83. Native multipath is enabled when those devices also report ALUA path state (or when a module parameter forces the feature more broadly). Path selection and availability are driven from the device access state that ALUA populates; core ALUA support that does not depend on device handlers is called out as a later phase.

Two new device classes present the multipath head and its member paths in sysfs, including the VPD identity, links to each path, and a tunable I/O policy. Supported policies include NUMA-local, round-robin, and queue-depth. Failover clones and resubmits the original bio when a path error is detected, rather than relying on partial completion semantics that SCSI does not guarantee. Blocking or unblocking a path clears or revalidates the path set and drains queued I/O. Per-path gendisks stay allocated for submission but are marked hidden; the multipath disk appears under ordinary sd naming so existing tools see one device.

The change matters because dm-mpath has long been the standard way to bond redundant SCSI paths, sitting above the block layer with its own userspace configuration. In-kernel multipath, already familiar from NVMe, can simplify the stack for ALUA-capable arrays and cut a layer of indirection. Hannes Reinecke reviewed portions of the series.