Mount
mount manages two things independently: whether a filesystem is mounted right now, and its entry in /etc/fstab.
No state formats a device, deletes data, removes directories recursively, or force- or lazy-unmounts a busy filesystem.
Comparing and changing mounts
Rivet reads current mounts from findmnt. Device paths and UUID=, LABEL=, PARTUUID=, and PARTLABEL= forms are resolved before comparing, and options the kernel adds by default don’t count as drift. fstype = "auto" accepts whatever type is mounted. Stacked mounts on one path, symlinked mountpoints or parents, and kernel paths such as /proc are refused.
When a mounted filesystem’s options drift, on_change decides what happens:
remount(default) applies the new options with a remount, where the kernel supports it.unmount_mountunmounts and mounts again. This is required when the source or type changes.failreports an error instead.
If an unmount fails because the filesystem is busy, the fstab entry is left unchanged.
Fstab entries
Rivet edits only the managed entry and keeps unrelated lines and comments. Spaces, tabs, and backslashes in fields are escaped. Two entries for the same mountpoint are an error. Writes are atomic, and the file is re-read before each one in case it changed. A resource that manages the whole /etc/fstab as a file conflicts with mount entries.
Fstab changes reload systemd as part of the same operation. Current-mount drift and fstab drift are handled separately: changing only the fstab entry doesn’t remount a filesystem that is already correct.
With persistent = false, an existing fstab entry is left alone, except that state = "absent" still removes it. at_boot = false writes noauto, so you can keep a filesystem unmounted now but mounted at boot, or the reverse.
Attributes
source and fstype are required unless state is absent, or state is unmounted with persistent = false. Options can’t be empty or contain commas, whitespace, or control characters, and conflicting pairs such as ro with rw or bind with rbind are refused.
If the mountpoint is also declared as a file, it must be a directory, or absent when the mount is removed. Rivet orders the mountpoint directory before the mount, and the mount before files beneath it. When both are removed, the mount is removed first. Existing mountpoints keep their ownership and mode; create_mountpoint creates a missing one owned by root with mode 0755.
The default timeout is 300 seconds. Mounts need mount.util_linux.v1, plus refresh.journal.v1 when they are persistent or absent. Static exports are path, state, and meta.sensitive. All common metadata applies, but mounts can’t be notification targets. Interrupted changes are recovered by re-inspecting and converging again; see recovery.