add timeoutsec to nfs mount file

This commit is contained in:
2021-08-26 18:22:25 -04:00
parent 12923178e4
commit e1220573a3

View File

@@ -114,6 +114,8 @@ WantedBy=multi-user.target
The below instructions assume your NFS share is located at `example.server:/srv/nfsfiles`. The below instructions assume your NFS share is located at `example.server:/srv/nfsfiles`.
***EDIT 2021-08-26*** Reader Denis suggested adding the `TimeoutSec` parameter to the below file to prevent lock-ups when the share isn't present on your local network. Thank you Denis for the contribution!
```bash ```bash
$ sudo nano /etc/systemd/system/mnt-nfs-nfsshare.mount $ sudo nano /etc/systemd/system/mnt-nfs-nfsshare.mount
``` ```
@@ -127,6 +129,7 @@ What=example.server:/srv/nfsfiles
Where=/mnt/nfs/nfsshare Where=/mnt/nfs/nfsshare
Type=nfs Type=nfs
Options=defaults Options=defaults
TimeoutSec=5
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target