Autofs: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: ** autofs will allow you to easily mount nfs/smb shares ** Suppose you have a server on your network that has content you would like to access from your xo. You can setup your xo to mou...)
 
(Use autofs to seamlessly mount nfs shares on the fly)
Line 1: Line 1:
** autofs will allow you to easily mount nfs/smb shares **
= autofs will allow you to easily mount nfs/smb shares =


Suppose you have a server on your network that has content you would like to access from your xo. You can setup your xo to mount that share as if it were local to your xo.
Suppose you have a server on your network that has content you would like to access from your xo. You can setup your xo to mount that share as if it were local to your xo.


First become root user:
First become root user:

{{{
su -l
su -l
}}}


Next install nfs-utils:
Next install nfs-utils:
{{{
yum install nfs-utils
yum install nfs-utils

}}}


Now install autofs:
Now install autofs:

{{{
yum install autofs
yum install autofs

}}}


Configure autofs by editimg /etc/auto.master:
Configure autofs by editimg /etc/auto.master:
{{{
#
#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
#
# Sample auto.master file
# Sample auto.master file
# This is an automounter map and it has the following forma
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
t
# For details of the format look at autofs(5).
# key [ -mount-options-separated-by-comma ] location
#
# For details of the format look at autofs(5).
#/misc /etc/auto.misc
#
#/net -hosts
#/misc /etc/auto.misc
/media /etc/auto.media --timeout=60
#/net -hosts
#
/media /etc/auto.media --timeout=60
# Include central master map if it can be found using
#
# nsswitch sources.
# Include central master map if it can be found using
#
# nsswitch sources.
# Note that if there are entries for /net or /misc (as
#
# above) in the included master map any keys that are the
# Note that if there are entries for /net or /misc (as
# same will not be seen as the first read key seen takes
# above) in the included master map any keys that are the
# precedence.
# same will not be seen as the first read key seen takes
#
# precedence.
#+auto.master
#
#+auto.master
}}}

Revision as of 03:29, 15 February 2008

autofs will allow you to easily mount nfs/smb shares

Suppose you have a server on your network that has content you would like to access from your xo. You can setup your xo to mount that share as if it were local to your xo.

First become root user:

su -l

Next install nfs-utils:

yum install nfs-utils


Now install autofs:

yum install autofs


Configure autofs by editimg /etc/auto.master:

#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
#/misc  /etc/auto.misc
#/net   -hosts
/media /etc/auto.media --timeout=60 
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
#+auto.master