Auto mount without fstab

  • create file

/etc/systemd/system/var-nfs.mount

name file mast directory if /var/nfs name var-nfs.mount, if /nfs name nfs.mount

[Unit]
Description=Things devices
After=network.target

[Mount]
What=1.1.2.2:/minio/nfs
Where=/var/nfs
Type=nfs4
Options=rw
Options=_netdev,auto
DirectoryMode=0755

[Install]
WantedBy=multi-user.target
  • and enable service systemctl enable var-nfs.mount

this all, afte reboot this automount nfs