Created
April 18, 2016 18:53
-
-
Save clcollins/bbe3f6001ce44f5c5266f06812b27efd to your computer and use it in GitHub Desktop.
Systemd NFS Automount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
systemctl enable <path-to-mountpoint>.automount | |
systemctl start <path-to-mountpoint>.automount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note that the filename must | |
# match the path to the mount point | |
# with dashes instead of slashes | |
[Unit] | |
Description=NFS Auto Mount | |
[Automount] | |
Where=<path-to-mountpoint> | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note that the filename must | |
# match the path to the mount point | |
# with dashes instead of slashes | |
[Unit] | |
Description=NFS Mount | |
[Mount] | |
What=<nfs-server>:<share> | |
Where=<path-to-mountpoint> | |
Type=nfs | |
Options=nfsvers=3 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment