Skip to content Skip to sidebar Skip to footer

Understanding the Berkeley automounter suite of utilities (BSD AMD)

The subject of using NFS file sharing has been discussed here on my blog, and can be easily found at various sites on the Internet. Today I want to comment on a utility's native BSD called BSD or BSD automounter Suite AMD that is used to mount NFS shares on demand.

How does it work? Suppose you have Server A, whose IP is 192.168.0.1 and that is sharing the directory document you want to mount on the desktop. In normal operation you should mount the share using the mount command or fstab configuring your machine for this setup was automatic. This works well, but becomes a permanent connection between host and server that can often be idle, causing waste of processing.

BSD AMD works as follows: set up a file in / etc calling amd.conf . This file has a structure similar to the smb.conf, and it pointed out a directory that will be monitored by AMD, in our example / servers . Also set up a map file, for example amd.map which will include a map of access to servers, it is a command line consisting of simple variables, such as the base directory on the machine, to a variable with the name of a server and a variable to a share. In this map we will not put any reference to one of the servers, we will only variables that will be filled by the automounter later.

With this service we configured and started a ls / servers / A / documents we return ... oops, all sharing the files on the server A. If I give a ls / servers / A this returns me, hey, all shares on that server as if they were sub-folders. Now, if I give an ls / servers / B / financial , assuming I have a server named B with a share of the financier there, he returns all files that share this server. Now if I have no server called C and do a ls / server / C / documents he did not return anything. Got it?

Basically what the automounter daemon does is to look within a directory and a mask / directory / server / share, it does auto mount them. How cool is that? The only detail to note here is that if the reference is made ​​based on the name, it is necessary that these are explicit in the / etc / hosts.

Post a Comment for "Understanding the Berkeley automounter suite of utilities (BSD AMD)"