SYSTEMD-MSTACK(1)
β¨ SYSTEMD-MSTACK β¨
okay bestie, buckle up, this is the systemd-mstack manual page (you'll also see it filed under SYSTEMD-MSTACK(1), iykyk) π
π NAME π
systemd-mstack, mount.mstack β Mstack Discoverable Disk Images (DDIs)
πΈ SYNOPSIS πΈ
systemd-mstack [OPTIONS...] IMAGE
systemd-mstack [OPTIONS...] [--mount] IMAGE PATH
systemd-mstack [OPTIONS...] [--umount] PATH
π¦ DESCRIPTION π¦
so systemd-mstack is literally the tool for peeking at and playing with .mstack/ mount stack directories, exactly as described in systemd.mstack(7). she does three things, and she does them well:
- Show you the general mount stack info, including every single "overlayfs" layer and bind mount that's described in there. π
- Mount a mount stack to a local directory.
- Unmount a mount stack from a local directory.
and here's the cute part β the systemd-mstack command can also be invoked as mount.mstack, and when you do that, she implements the mount(8) "external helper" interface. meaning mount stack directories that are compatible with systemd-mstack can be mounted directly by mount and fstab(5). the deets are down below, don't worry. π
also!! in place of the image path you can specify a .v/ versioned directory, see systemd.v(7) for the details. π
π COMMANDS π
if you don't pass any of the command switches listed below, the mount stack you named just gets opened and she shows you the general info about it, including a list of all the defined layers. lowkey the default is a whole vibe check.
--mount,-mβ mount the specified mount stack to the specified directory.
to unmount a mount stack directory that was mounted like this, use the --umount operation.
ngl this functionality is also available in mount(8) via a command like mount -t mstack mystack.mstack targetdir/, and in fstab(5) too. details below, bestie.
Added in version 260.
-Mβ this is a shortcut for--mount --mkdir. β¨
Added in version 260.
--umount,-uβ unmount a mount stack from the specified directory. this command expects one argument: a directory where the mount stack was mounted.
all mounted mounts will be recursively unmounted. every last one. she's thorough. π
Added in version 260.
-Uβ this is a shortcut for--umount --rmdir.
Added in version 260.
-h,--helpβ print a short help text and exit. the classic.--versionβ print a short version string and exit.
π OPTIONS π
here's what she understands, queen:
--read-only,-rβ operate in read-only mode. by default,--mountwill establish writable mount points. if you specify this option, they get established in read-only mode instead. no cap.
Added in version 260.
--mkdirβ if combined with--mount, the directory you're mounting the mount stack to gets created if it's missing. but heads up: that directory is not automatically removed when the mount stack is unmounted again. π
Added in version 260.
--rmdirβ if combined with--umount, the specified directory where the mount stack is mounted gets removed after unmounting it.
Added in version 260.
--image-policy=policyβ takes an image policy string as argument, as persystemd.image-policy(7). the policy is enforced when operating on the disk image specified via--image=, see above. if not specified, it defaults to the"*"policy, i.e. all recognized file systems in the image are used.--image-filter=filterβ takes an image filter string as argument, as persystemd.image-filter(7). the filter is taken into consideration when operating on the disk image specified via--image=, see above. if not specified, no filtering is applied. clean. β¨--no-pagerβ do not pipe output into a pager.--no-legendβ do not print the legend, i.e. column headers and the footer with hints. bye bye clutter π«Ά--json=MODEβ shows output formatted as JSON. expects one of"short"(for the shortest possible output without any redundant whitespace or line breaks),"pretty"(for a pretty version of the same, with indentation and line breaks) or"off"(to turn off JSON output, the default).
β EXIT STATUS β
on success, 0 is returned, a non-zero failure code otherwise. periodt.
π INVOCATION AS /SBIN/MOUNT.MSTACK π
the systemd-mstack executable may be symlinked to /sbin/mount.mstack. if she's invoked through that, she implements mount(8)'s "external helper" interface for the (pseudo) file system type "mstack". which means conformant mount stack directories may be mounted directly via
# mount -t mstack mystack.mstack targetdir/
in a fashion mostly equivalent to:
# systemd-mstack --mount mystack.mstack targetdir/
β οΈ note that since a single mount stack may contain multiple mount points, it should later be unmounted withumount -R targetdir/, for recursive operation. do not forget the-R, bestie, i am begging π
this functionality is particularly useful to mount mount stacks automatically at boot via simple /etc/fstab entries. for example:
/path/to/mystack.nspawn /images/mystack/ mstack defaults 0 0
when invoked this way, the mount options "ro" and "rw" map to the corresponding options listed above (i.e. --read-only). iconic behavior honestly π
π§ SEE ALSO π§
systemd(1), systemd.mstack(7), systemd-nspawn(1), systemd.exec(5), mount(8), umount(8)
and that's the whole thing, bestie!! this page came to you from systemd 262.1 β SYSTEMD-MSTACK(1), dated as ever β so go forth and mount responsibly ππ
π
π¦ 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