Auto Mount with SystemD

This shows how to automount remote network drives using systemd and fstab

Automount using systemd

Sometimes partitions can fail to mount on startup and some options are needed to fix this. I’ve had two instances where it was needed. One was on a slow 6 TB drive that timed out on occation during boot and I had to sudo mount -a to get it to mount

For this a simple option addition in fstab on a local disk looks like this:


Next, I had problems with NFS shares not mounting and I had to expand these option to:


This makes the /etc/fstab entry look like this:		/media/images	nfs	noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev	0	0