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

Spam Kommentare sind sinnlos !
Vor der Publizierung wird jeder Beitrag auf Spam geprüft. Leider dauert es deswegen bis ein Kommentar sichtbar wird. Dafür erhält aber kein Subscriber Spam eMails.
Die eMail ist optional und nicht öffentlich sichtbar. Sie ist notwendig um eMail Benachrichtigungen zu Antworten auf Kommentare zu erhalten. Sie wird auch u.U. auch vom Seitenbetreiber genutzt um offline Kontakt aufzunehmen.

Spam comments are useless !
Any comment will be reviewed first and checked for spam. Unfortunately this delays the publishing of comments but will protect subscribers from spam.
eMail is optional and hidden and is required to get update notifications for any comments. In addition your eMail may be used by the website owner to get in contact with you offline.