Partition mount unit

Sample MOUNT unit for DISK device


[Type] and [Options] are optional for disk devices. To reduce unnecessary writings to SSD devices the noatime option is recommended.

/etc/systemd/system/data-build.mount

[Unit]
Description=Mount build partition

[Mount]
What=/dev/disk/by-uuid/899b1bc4-219c-4b92-8539-0aa118d9780a
Where=/data/build
#Type=
#Options=

[Install]
WantedBy=multi-user.target

Automount unit

cat /etc/systemd/system/data-build.automount

[Unit]
Description=Automount build partition
ConditionPathExists=/data/build

[Automount]
Where=/data/build
TimeoutIdleSec=10

[Install]
WantedBy=multi-user.target