; systemd/mount-nas.service
; Mount /mnt/nas-archive from the NAS at boot. Used for cold storage
; only - the compose stacks do not depend on it.
[Unit]
Description=Mount archive NAS over NFSv4
After=network-online.target
Wants=network-online.target
ConditionPathExists=!/mnt/nas-archive/.mounted
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/install -d /mnt/nas-archive
ExecStart=/usr/bin/mount -t nfs4 -o \
vers=4.2,rsize=1048576,wsize=1048576,hard,intr,_netdev,sec=sys \
nas.home.arpa:/export/archive /mnt/nas-archive
ExecStop=/usr/bin/umount /mnt/nas-archive
TimeoutStartSec=30
Restart=on-failure
RestartSec=15s
[Install]
WantedBy=multi-user.target