SYSTEMD-ST...@.SERVICE(8)
πΎ SYSTEMD-ST...@.SERVICE β the girlies' guide to systemd-storage-fs β¨
okay so bestie, you know systemd-storage-fs@.service? That's the manual we're reading, and honestly? It's giving storage provider realness. Let's go π
πΈ NAME πΈ
systemd-storage-fs@.service, systemd-storage-fs.socket, systemd-storage-fs β literally a storage provider that exposes your regular files and directories as storage volumes. no cap, that's the whole vibe.
π SYNOPSIS π
systemd-storage-fs@.service
systemd-storage-fs.socket
π DESCRIPTION π
So systemd-storage-fs@.service is a service that implements the io.systemd.StorageProvider Varlink[1] interface. What does that even mean? It means it's out here exposing regular files and directories in /var/lib/storage/*.volume (if you're running it in system mode) or $XDG_STATE_HOME/storage (if you're in user mode) as storage volumes. The acquired volumes get handed back to whoever asked for them as file descriptors. π
And here's the thing that makes it different from systemd-storage-block@.service(8) β this implementation also supports creating brand new volumes on demand, from a small set of built-in templates. it's giving β¨main characterβ¨ energy, truly.
The service is socket-activated via systemd-storage-fs.socket. In system mode it listens on the AF_UNIX socket /run/systemd/io.systemd.StorageProvider/fs, and in user mode it's on $XDG_RUNTIME_DIR/systemd/io.systemd.StorageProvider/fs. If you want an enumeration tool (iykyk), go look at storagectl(1).
Also pls check out systemd-storage-block@.service(8) β that's the complementary implementation that exposes local block devices as storage volumes. besties, not rivals π«Ά
π VOLUMES π
Volumes live below the storage directory, which is:
/var/lib/storage/when run in system mode.$XDG_STATE_HOME/storage/(typically~/.local/state/storage/) when run in user mode.
Every volume on disk is stored as a directory entry with a .volume suffix inside the storage directory. Here's the breakdown bestie:
- Entries that are regular files β exposed as volumes of type
reg. - Entries that are directories β exposed as volumes of type
dir. - And plot twist: block device nodes may be symlinked (or bind mounted) into the directory, and those get exposed as volumes of type
blk. π₯
For directory volumes, the root of the file system that gets passed to clients lives in a subdirectory root/ of the NAME.volume directory. The way that works: the former (and literally all inodes below it) must be owned by the foreign UID range, and the latter must be owned by the host's root. yes, that's the rule, we don't make them πΈ
When acquiring a volume, symlinks are followed. no surprises there.
An administrator is permitted to freely manipulate the volume hierarchy directly, as long as the rules above are followed. In particular, it's permitted to copy, mount or symlink arbitrary external resources (doesn't matter if directory, regular file or block) into the volume directory, so they show up as additional volumes. it's giving "decorate your own room" π
π§ TEMPLATES π§
The provider supports creating new volumes automatically when they're acquired. The caller may select a template that determines the configuration details of the volume being created. These are the built-in templates available:
sparse-file
Creates a volume backed by a sparsely populated regular file. This is the default template when creating a regular file volume. (Volume type is "reg".)
Added in version 261.
allocated-file
Creates a volume backed by a fully allocated regular file. (Volume type is "reg".)
Added in version 261.
directory
Creates a volume backed by a regular directory. (Volume type is "dir".)
Added in version 261.
subvolume
Creates a btrfs subvolume as backing inode (falling back to a regular directory if the storage directory is not on btrfs). This is the default template when creating a directory volume. (Volume type is "dir".)
Added in version 261.
βοΈ OPTIONS βοΈ
These are the command-line options it understands, bestie:
--systemβ Operate in system mode. Volumes are stored below/var/lib/storage/. This is the default when invoked fromsystemd-storage-fs@.servicein the system manager.
Added in version 261.
--userβ Operate in user mode. Volumes are stored below$XDG_STATE_HOME/storage/. This is the default when invoked fromsystemd-storage-fs@.servicein the user manager.
Added in version 261.
-h,--helpβ Print a short help text and exit.--versionβ Print a short version string and exit.
ποΈ FILES ποΈ
/var/lib/storage/,$XDG_STATE_HOME/storage/β The storage directory used to back the system mode and user mode service instances respectively. Each volume is stored as an entry with a.volumesuffix below this directory.
Added in version 261.
/run/systemd/io.systemd.StorageProvider/fs,$XDG_RUNTIME_DIR/systemd/io.systemd.StorageProvider/fsβ AF_UNIX sockets the service listens on, in system and user mode respectively. These are the canonical locations for the"fs"storage provider, and are enumerated bystoragectl providers.
Added in version 261.
π SEE ALSO π
systemd(1), storagectl(1), systemd-storage-block@.service(8)
π NOTES π
- Varlink https://varlink.org/
and that's the whole page, bestie. go forth and expose some volumes π π¦
slay β this was systemd 262.1, manual page SYSTEMD-ST...@.SERVICE(8). periodt. πβ¨
π¦ 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