SYSTEMD-ST...M.SERVICE(8)

๐Ÿ’– SYSTEMD-STORAGETM.SERVICE ๐Ÿ’–

okay bestie, gather round, because this is the systemd-storagetm.service / systemd-storagetm manual page from the systemd-storagetm.service corner of the systemd universe, and it is lowkey one of the most unhinged things systemd can do. buckle up ๐ŸŽ€


โœจ NAME โœจ

systemd-storagetm.service, systemd-storagetm โ€” the girlies that expose all your local block devices as NVMe-TCP mass storage devices. yes, all of them. no cap. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

systemd-storagetm.service

/usr/lib/systemd/systemd-storagetm [OPTIONS...] DEVICE...

/usr/lib/systemd/systemd-storagetm [OPTIONS...] --all

/usr/lib/systemd/systemd-storagetm [OPTIONS...] --list-devices

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so systemd-storagetm.service is a service that exposes all local block devices as NVMe-TCP mass storage devices. its whole main character moment is being invoked by the storage-target-mode.target unit that you can boot into. it's giving "your disks are now everyone's disks". ๐Ÿ™ˆ

โš ๏ธ Warning, and I mean it, fr fr โš ๏ธ the NVMe disks are currently exposed without authentication or encryption, in read/write mode. this means network peers may read from and write to the device without any restrictions. so this functionality should hence only be used in a local setup. no gatekeeping, no nothing, anyone on the network can just walk in and touch your stuff. ๐Ÿ’€

also note that to function properly, networking must be configured too. the recommended mechanism to boot into a storage target mode is by adding this on the kernel command line:

rd.systemd.unit=storage-target-mode.target ip=link-local

and bestie, pay attention: ip=link-local only configures link-local IP, i.e. IPv4LL and IPv6LL, which means non-routable addresses. this is done for security reasons, so that only systems on the local link can access the devices. use ip=dhcp to assign routable addresses too. for further details see systemd-network-generator.service(8). โœจ

unless the --list-devices or --all switches are used, one or more block devices or regular files to expose via NVMe-TCP must be specified as arguments. so like, you gotta say what you want, she's not a mind reader. ๐Ÿซถ


๐Ÿ’œ OPTIONS ๐Ÿ’œ

the following options are understood:

  • --nqn= โ€” takes a string. if specified, configures the NVMe Qualified Name to use for the exposed NVMe-TCP mass storage devices. the NQN should follow the syntax described in NVM Express Base Specification 2.0c[1], section 4.5 "NVMe Qualified Names". note that the NQN specified here will be suffixed with a dot and the block device name before it is exposed on the NVMe target. if not specified, defaults to "nqn.2023-10.io.systemd:storagetm.ID", where ID is replaced by a 128bit ID derived from machine-id(5). so iconic of her.

added in version 255. โญ

  • --all, -a โ€” if specified, exposes all local block devices via NVMe-TCP, current and future (i.e. it watches block devices come and go and updates the NVMe-TCP list as needed). note that by default any block devices that originate on the same block device as the block device backing the current root file system are excluded. if the switch is specified twice, this safety mechanism is disabled. ๐Ÿ‘€ (yes, twice. that's the secret handshake.)

added in version 255. โญ

  • --list-devices โ€” show a list of candidate block devices this command may operate on. specifically, this enumerates block devices currently present, and shows their device node paths along with any of their symlinks. it's the vibe check before the actual party. ๐ŸŒˆ

added in version 257. โญ

  • -h, --help โ€” print a short help text and exit. the "hey bestie, what do you do" button. ๐ŸŽ€
  • --version โ€” print a short version string and exit. ๐Ÿ’ซ

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

systemd(1), systemd.special(7)


๐Ÿ“ NOTES ๐Ÿ“

  1. NVM Express Base Specification 2.0c https://nvmexpress.org/wp-content/uploads/NVM-Express-Base-Specification-2.0c-2022.10.04-Ratified.pdf

and that's the whole thing, periodt. this page lives in systemd 262.1, and yes, that footer is the same SYSTEMD-ST...M.SERVICE(8) name you saw at the top โ€” the manual name got folded in, the version is right here, and she ate. ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms