This is when you mount an exported directory on a machine on the machine itself. This can be useful if you want to offer an arbritrary directory on your system on an anonymous FTP server that chroots to a directory tree, making symbolic links not work. However, it can be slow and unstable. The anonymous FTP implementation should be improved.

In Solaris loopback mounts are implemented with a special loopback file system, lofs; actually, I think most Unix variants have such a filesystem. The Solaris automounter defaults to loopback mounting rather than NFS for a mount point specification in which the server is the client host itself.

So in a way, loopback mounts are the opposite of NFS mounts.

Besides the above mentioned anonymous ftp chroot jail use, the loopback mount is also used by the automounter in a homogenous NFS cluster that shares config files.

The idea is that you want all your machines to look the same and use the same config files, even the server. When an automount directory is accessed on the server, the server's automounter sees it is local, and loopback mounts it instead of NFS mounting it.

Other options would be to put a symlink there on the server, or have the server export the directory from where the automounter mounts it on other machines. However, either of these would confuse the automounter, and require you to use a different config file on the server than on the clients, which is difficult or impossible in NIS or diskless setups, or in situations where there are directories on other servers also served by the automounter.

Log in or register to write something here or to contact authors.