It's not convenient to mount remote nfs disks just before using them from time to time. Automounter in Linux solves this issue. Just change into a subdirectory and the remote filesystem will be mounted by magic. Unfortunately there is one drawback: Th directory on the client will be created if you enter the directory by specifying it's name. Therfore you cannot use TAB expansion in a commandline. It's even not possible to open this directory in a GUI. But there is a solutiona available: Symbolic links:
Following pages describe in detail how to configure automount and it's very convenient to connect to remote nfs disks.


On the server called raspifix the following directories are exported:


/disks/silver/photos      *(rw,sync,no_subtree_check,no_root_squash)
/disks/silver/software    *(rw,sync,no_subtree_check,no_root_squash)

and the command showmount -e raspifix

Export list for raspifix:
/disks/silver/software *
/disks/silver/photos   *

On the client there exists /etc/auto.master

/nfs/raspifix    /etc/auto.nfs --timeout=60

and a directory called /nfs/raspifix was created with sudo mkdir -p /nfs/raspifix

The contents of /etc/auto.nfs is

software    raspifix:/disks/silver/software
photos      raspifix:/disks/silver/photos
Now you can change in the console with cd /nfs/raspifix/software into the directory and automount connects the driectory to the rmote nfs disk on raspifix. But you have to type in the directory name. No TAB expansion is possible. In a GUI it's also not possible to enter the directory because it's not known at this point in time. Now create another directory with symbolic links to /nfs/raspifix (Don't forget to stop autonfs).
sudo ln -s /nfs/raspifix/software /remote/raspifix/software
sudo ln -s /nfs/raspifix/photos /remote/raspifix/photos
Now start autonfs again and you can change into directory /remote/raspifix/software /remote/raspifix/photos with TAB expansion or in a GUI. Automount will connect the remote directory immediately.
The following graphic explains in more detail the correlation of the different names used in configuration files, the directory names used on the client and the exported directory names used on the server.
Add comment
eMail is hidden and not visible to the public. It's used to inform you about new comments.