'\" t .TH "SYSTEMD\-STORAGE\-FS@\&.SERVICE" "8" "" "systemd 261.1" "systemd-storage-fs@.service" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" systemd-storage-fs@.service, systemd-storage-fs.socket, systemd-storage-fs \- Storage provider exposing regular files and directories as storage volumes .SH "SYNOPSIS" .PP systemd\-storage\-fs@\&.service .PP systemd\-storage\-fs\&.socket .SH "DESCRIPTION" .PP systemd\-storage\-fs@\&.service is a service that implements the \fBio\&.systemd\&.StorageProvider\fR \m[blue]\fBVarlink\fR\m[]\&\s-2\u[1]\d\s+2 interface, exposing regular files and directories in /var/lib/storage/*\&.volume (if used in system mode) or $XDG_STATE_HOME/storage (when used in user mode) as storage volumes\&. Acquired volumes are returned to the caller as file descriptors\&. Unlike \fBsystemd-storage-block@.service\fR(8), this implementation also supports creating new volumes on demand from a small set of built\-in templates\&. .PP 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, in user mode on $XDG_RUNTIME_DIR/systemd/io\&.systemd\&.StorageProvider/fs\&. See \fBstoragectl\fR(1) for an enumeration tool\&. .PP See also \fBsystemd-storage-block@.service\fR(8) for a complementary implementation that exposes local block devices as storage volumes\&. .SH "VOLUMES" .PP Volumes are stored below the storage directory: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} /var/lib/storage/ when run in system mode\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} $XDG_STATE_HOME/storage/ (typically ~/\&.local/state/storage/) when run in user mode\&. .RE .PP Each volume on disk is stored as a directory entry with a \&.volume suffix in the storage directory\&. Entries which are regular files are exposed as volumes of type \fBreg\fR; entries which are directories are exposed as volumes of type \fBdir\fR\&. Moreover, block device nodes may be symlinked (or bind mounted) into the directory, which are then exposed as volumes of type \fBblk\fR\&. .PP For directory volumes, the root of the file system passed to clients is placed in a subdirectory root/ of the \fINAME\fR\&.volume directory\&. The former (and all inodes below it) must be owned by the foreign UID range, the latter by the host\*(Aqs root\&. .PP When acquiring a volume, symlinks are followed\&. .PP An administrator is permitted to freely manipulate the volume hierarchy directly as long as the rules described above are followed\&. In particular, it\*(Aqs permitted to copy, mount or symlink arbitrary external resources (regardless if directory, regular file or block) into the volume directory, so that they are exposed as additional volumes\&. .SH "TEMPLATES" .PP The provider supports creating new volumes automatically when they are acquired\&. The caller may select a \fItemplate\fR that determines configuration details of the volume to create\&. The following built\-in templates are available: .PP \fBsparse\-file\fR .RS 4 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"\&.) .sp Added in version 261\&. .RE .PP \fBallocated\-file\fR .RS 4 Creates a volume backed by a fully allocated regular file\&. (Volume type is "reg"\&.) .sp Added in version 261\&. .RE .PP \fBdirectory\fR .RS 4 Creates a volume backed by a regular directory\&. (Volume type is "dir"\&.) .sp Added in version 261\&. .RE .PP \fBsubvolume\fR .RS 4 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"\&.) .sp Added in version 261\&. .RE .SH "OPTIONS" .PP The following command\-line options are understood: .PP \fB\-\-system\fR .RS 4 Operate in system mode\&. Volumes are stored below /var/lib/storage/\&. This is the default when invoked from systemd\-storage\-fs@\&.service in the system manager\&. .sp Added in version 261\&. .RE .PP \fB\-\-user\fR .RS 4 Operate in user mode\&. Volumes are stored below $XDG_STATE_HOME/storage/\&. This is the default when invoked from systemd\-storage\-fs@\&.service in the user manager\&. .sp Added in version 261\&. .RE .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Print a short help text and exit\&. .RE .PP \fB\-\-version\fR .RS 4 Print a short version string and exit\&. .RE .SH "FILES" .PP /var/lib/storage/, $XDG_STATE_HOME/storage/ .RS 4 The storage directory used to back the system mode and user mode service instances respectively\&. Each volume is stored as an entry with a \&.volume suffix below this directory\&. .sp Added in version 261\&. .RE .PP /run/systemd/io\&.systemd\&.StorageProvider/fs, $XDG_RUNTIME_DIR/systemd/io\&.systemd\&.StorageProvider/fs .RS 4 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 by \fBstoragectl providers\fR\&. .sp Added in version 261\&. .RE .SH "SEE ALSO" .PP \fBsystemd\fR(1), \fBstoragectl\fR(1), \fBsystemd-storage-block@.service\fR(8) .SH "NOTES" .IP " 1." 4 Varlink .RS 4 \%https://varlink.org/ .RE