dm-switch
dm-switch is a Linux device-mapper target that selects a backing path for each fixed-size region of a logical block device.
Routing: The documented two-tier design directs a region toward its owning array member, with multipath below handling routes to that member. Region size and backing offsets use 512-byte sectors. Switching paths does not copy data. [1]
Addressing: Linux v6.12 adds the selected path's starting offset to the target-relative sector; it does not compact regions like striping. [2]
Updates: set_region_mappings consumes hexadecimal region and path indices. In v6.12, an invalid later argument can leave earlier entries changed. Message serialization does not provide rollback. The status output does not export the live region map. [1] [2]
Relations
- related
- Multipath I/O, iSCSI
Limitations
- Safe routing requires the selected destination to expose the intended logical data; unrelated devices are not interchangeable replicas. [1]
Citations
- Linux v6.12: dm-switch region routing and two-tier multipath layout
- Linux v6.12: switch_map, process_set_region_mappings and switch_status
Sources & caveats
- Implementation reviewed at Linux v6.12 commit adc218676eef25575469234709c2d87185ca223a.
- Source review and a pure integer address model only; no device-mapper mapping was loaded and no I/O or failure was injected.