If you have things working, ignore what I've written below. It is just some things I've learned from senior Unix admins over the decades.
The autofs process has config files in /etc/ usually tied to auto.master and auto.nfs/auto.cifs which have a specific, sometimes odd, format. No need to touch the fstab - I'd not heard of autofs using the fstab before today. The autofs manpage:
Code:
OPERATION
autofs will consult a configuration file /etc/auto.master (see
auto.master(5)) by default to find mount points on the system. For each
of those mount points automount(8) will mount and start a thread, with
the appropriate parameters, to manage the mount point.
Perhaps systemd changed something, again?! There is no mention of automout in the fstab manpage.
The main reason I prefer using autofs is that unused network storage mounts aren't mounted. This is very handy with the remote storage may not be powered on or for a laptop that might not be on the home network. It is also helpful with USB storage devices that might not be connected all the time.
<rant>
I'm a little old-school, so new x-...... additions to mount options in the fstab file seem like too many cooks in the kitchen. Whenever that happens, the chances of problems increases. resolvconf is an example where things were working great, but "someone" decided to make it more flexible and DNS has never worked right since then. The last few releases, the systemd team has been trying to "fix" the issue ---- only to make it worse. IMHO.
Searching the manpages, systemd.automount does say something about using the fstab.
Code:
FSTAB
Automount units may either be configured via unit files, or via
/etc/fstab (see fstab(5) for details).
For details how systemd parses /etc/fstab see systemd.mount(5).
If an automount point is configured in both /etc/fstab and a unit file,
the configuration in the latter takes precedence.
Once again, too many cooks, IMHO.
</rant>
For network mounts, I like to keep the mount point on the source system the same as the mount point on each client to prevent confusion.
/D on the NFS host is /D on each client. 1-for-1 mapping, but I'm a little slow sometimes. For example:
Code:
$ df .
Filesystem Size Used Avail Use% Mounted on
istar:/D 3.5T 3.5T 42G 99% /D
istar is the hostname of the NFS server where /D is a 4TB partition.
On the current machine, I made an empty directory, /D, which serves as the mount point for the NFS storage.
If you are doing media streaming from the NAS and see any stuttering over CIFS, Kodi MP recommends switching to NFS which seems to help assuming the NAS is 100Mbps wired ethernet or faster.
Bookmarks