general:linux:automount_fs_-_usb
https://serverfault.com/questions/766506/automount-usb-drives-with-systemd#804212
there is a new, succinct systemd auto-mount option which can be used with fstab which allows you to use all the standardized mount permission options, and it looks like this:
x-systemd.automount
an example of it in an fstab line:
/dev/sdd1 /mnt/hitachi-one auto noauto,x-systemd.automount 0 2
the noauto option will mean it will not attempt to be mounted at boot, as with older software autofs.
after adding a new x-systemd.automount line to fstab you then need to run:
sudo systemctl daemon-reload
and then both, or one, of the following:
sudo systemctl restart remote-fs.target sudo systemctl restart local-fs.target
for more infomation about it:
https://wiki.archlinux.org/index.php/Fstab#Automount_with_systemd
general/linux/automount_fs_-_usb.txt · Last modified: 2020/11/17 22:13 by sunkan