Difference between revisions of "Automount"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
(Describes mounting of home directories)
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
According to its manual page, automount "manage[s] autofs mount points."  It runs at startup and "sets up mount points for each entry in the master map, allowing them to be automatically mounted when accessed."  ''autofs'' is the service program that does the mounting/unmounting when needed.
 
According to its manual page, automount "manage[s] autofs mount points."  It runs at startup and "sets up mount points for each entry in the master map, allowing them to be automatically mounted when accessed."  ''autofs'' is the service program that does the mounting/unmounting when needed.
 
+
== Server Configuration ==
== Configuration ==
+
An NFS server must list the directories it serves in ''/etc/exports''.
 +
== General Configuration ==
 
''automount'' looks in ''/etc/auto.master'' for a map.  Our setup apparently requires a non-default mapping:
 
''automount'' looks in ''/etc/auto.master'' for a map.  Our setup apparently requires a non-default mapping:
 
  /net /etc/auto.net
 
  /net /etc/auto.net
It is important to note that that '''is not''' the default ''/etc/auto.net'' either.  It seems that the following files in ''/etc/'' are also used by ''autofs'':
+
It is important to note that that '''is not''' the default ''/etc/auto.net'' either.
* auto.misc.dist
+
The detailed contents of ''auto.master'' and ''auto.net'' can be found here: [[Autofs Configuration Files]].   
* auto.net
+
 
* auto.net.dist
+
If SELinux is enabled, once the files are added/edited, their security context may get changed as well, and it may be necessary to run <code>restorecon -R -v /etc</code> before restarting ''autofs'', in order for ''autofs'' to work.
The detailed contents can be found here: [[Autofs_Configuration_Files]].
+
 
 +
== Backup Server Configuration ==
 +
In addition to the above changes, the backup server has the line
 +
/mnt/npg-daily /etc/auto.npg-daily
 +
in ''/etc/auto.master'', and
 +
# mount backup disks by label
 +
*       -fstype=auto,noatime    :-Lnpg-daily-&
 +
in ''/etc/auto.npg-daily'' . The '*' is for matching, and the '&' gets replaced by what is matched.  So, for example, a search for "30" will mount the drive labelled "npg-daily-30".  See the manual for ''autofs'' for more details.

Latest revision as of 19:18, 9 June 2008

According to its manual page, automount "manage[s] autofs mount points." It runs at startup and "sets up mount points for each entry in the master map, allowing them to be automatically mounted when accessed." autofs is the service program that does the mounting/unmounting when needed.

Server Configuration

An NFS server must list the directories it serves in /etc/exports.

General Configuration

automount looks in /etc/auto.master for a map. Our setup apparently requires a non-default mapping:

/net	/etc/auto.net

It is important to note that that is not the default /etc/auto.net either. The detailed contents of auto.master and auto.net can be found here: Autofs Configuration Files.

If SELinux is enabled, once the files are added/edited, their security context may get changed as well, and it may be necessary to run restorecon -R -v /etc before restarting autofs, in order for autofs to work.

Backup Server Configuration

In addition to the above changes, the backup server has the line

/mnt/npg-daily	/etc/auto.npg-daily

in /etc/auto.master, and

# mount backup disks by label
*       -fstype=auto,noatime    :-Lnpg-daily-&

in /etc/auto.npg-daily . The '*' is for matching, and the '&' gets replaced by what is matched. So, for example, a search for "30" will mount the drive labelled "npg-daily-30". See the manual for autofs for more details.