Systemd Working On "Storage Target Mode" Feature - Inspired By Apple macOS
Lennart Poettering has been working on a new systemd feature called systemd-storagetm that is inspired by the Apple macOS "Target Disk Mode" feature.
Systemd Storage Target Mode via the new tgtmode.target when booted into defines the target mode. There is then the systemd-tgtmode tool and service that exposes a specific (or all) NVMe devices to appear on the network. Any disk is exposed as NVMe-TCP but without any encryption or authentication and just intended for local links / LAN usage.
This is similar to Apple's Target Disk Mode as a boot option on Macs that allows other systems to then easily access it as an external device. The systemd intent with this Storage Target Mode is to make it easier to debug a broken system with very few dependencies while being able to access the raw block device of the broken system via the network. This may also make it easier to migrate from one system to the next. By having access to the raw block device via NVMe-TCP, it can be easy to use the "dd" command or similar for copying the drive.
With the tentative patches, booting into the system with rd.systemd.unit=tgtmode.target ip=dhcp can enable the storage target mode functionality. Besides not having any authentication or encryption, currently everything is handled in read-write mode while a read-only mode might come in the future. Lennart also has some additional feature ideas in mind for the future.
The initial code and details on the systemd Storage Target Mode feature can be found via this pull request currently undergoing review and discussion by Lennart and other systemd stakeholders.
Systemd Storage Target Mode via the new tgtmode.target when booted into defines the target mode. There is then the systemd-tgtmode tool and service that exposes a specific (or all) NVMe devices to appear on the network. Any disk is exposed as NVMe-TCP but without any encryption or authentication and just intended for local links / LAN usage.
This is similar to Apple's Target Disk Mode as a boot option on Macs that allows other systems to then easily access it as an external device. The systemd intent with this Storage Target Mode is to make it easier to debug a broken system with very few dependencies while being able to access the raw block device of the broken system via the network. This may also make it easier to migrate from one system to the next. By having access to the raw block device via NVMe-TCP, it can be easy to use the "dd" command or similar for copying the drive.
With the tentative patches, booting into the system with rd.systemd.unit=tgtmode.target ip=dhcp can enable the storage target mode functionality. Besides not having any authentication or encryption, currently everything is handled in read-write mode while a read-only mode might come in the future. Lennart also has some additional feature ideas in mind for the future.
The initial code and details on the systemd Storage Target Mode feature can be found via this pull request currently undergoing review and discussion by Lennart and other systemd stakeholders.
30 Comments