NFS: Difference between revisions
imported>Patryk27 mNo edit summary |
imported>Patryk27 No edit summary |
||
Line 71: | Line 71: | ||
Note that clients see exposed shares as if they were exposed at the root level - i.e. <code>/export/foo</code> becomes <code>/foo</code> (in the <code>device</code> option). Other, regular '''fileSystems''' options apply. | Note that clients see exposed shares as if they were exposed at the root level - i.e. <code>/export/foo</code> becomes <code>/foo</code> (in the <code>device</code> option). Other, regular '''fileSystems''' options apply. | ||
=== Specifying NFS version === | |||
You can specify NFS version by adding the <code>"nfsvers="</code> option: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ | { | ||
Line 81: | Line 83: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Lazy-mounting === | |||
By default, all shares will be mounted right when your machine starts - apart from being simply unwanted sometimes, this may also cause issues when your computer doesn't have a stable network connection or uses WiFi; you can fix this by telling systemd to mount your shares the first time they are ''accessed'' (instead of keeping them mounted at all times): | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 92: | Line 96: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Auto-disconnecting === | |||
You can also tell systemd to disconnect your NFS-client from the NFS-server when the directory has not been accessed for some time: | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> |