automount(8) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

automount(8)

automount(8)            System Administration Commands            automount(8)

NAME
       automount - install automatic mount points

SYNOPSIS
       /usr/sbin/automount [-t duration] [-v]

DESCRIPTION
       The  automount  utility  installs autofs mount points and associates an
       automount map with each mount point. It starts the automountd(8) daemon
       if it finds any non-trivial entries in either local or distributed  au‐
       tomount  maps and if the daemon is not already running. The autofs file
       system monitors attempts to access directories within it  and  notifies
       the automountd(8) daemon. The daemon uses the map to locate a file sys‐
       tem,  which  it then mounts at the point of reference within the autofs
       file system. A map can be assigned to an autofs mount using an entry in
       the /etc/auto_master map or a direct map.


       If the file system is not accessed within an appropriate  interval  (10
       minutes by default), the automountd daemon unmounts the file system.


       The  file /etc/auto_master determines the locations of all autofs mount
       points. By default, this file contains three entries:

         # Master map for automounter
         #
         +auto_master
         /net          -hosts    -nosuid
         /home         auto_home



       The +auto_master entry is a reference to an external LDAP or NIS master
       map. If one exists, then its entries are read as if  they  occurred  in
       place  of  the  +auto_master entry. The remaining entries in the master
       file specify a directory on which an autofs mount will be made followed
       by the automounter map to be associated with it. Optional mount options
       may be supplied as an optional third field in the each entry. These op‐
       tions are used for any entries in the map that do not specify mount op‐
       tions explicitly. The automount command is usually  run  without  argu‐
       ments.  It  compares the entries /etc/auto_master with the current list
       of autofs mounts in /etc/mnttab and adds,  removes  or  updates  autofs
       mounts  to  bring the /etc/mnttab up to date with the /etc/auto_master.
       At boot time it installs all autofs mounts from the master map.  Subse‐
       quently,  it may be run to install autofs mounts for new entries in the
       master map or the direct map, or to perform unmounts for  entries  that
       have been removed from these maps.

   SMF Management
       The  automount  service  is managed by the service management facility,
       smf(7), under the service identifier:

         svc:/system/filesystem/autofs:default



       Administrative actions on this service, such as enabling, disabling, or
       requesting restart, can be performed  using  svcadm(8).  The  service's
       status can be queried using the svcs(1) command.


       Startup  autofs  SMF  parameters for automount can be manipulated using
       sharectl(8). Refer to sharectl(8) for instructions for viewing and  up‐
       dating these parameters. Supported parameters are:

       timeout=num

           Specifies  a  duration, in seconds, that a file system is to remain
           mounted when not in use. The default value  is  600  (10  minutes).
           Equivalent to the -t option in automount.


       automount_verbose=TRUE | FALSE

           Verbose  mode.  Causes  you  to be notified of non-critical events,
           such as autofs mounts and unmounts. The  default  value  is  FALSE.
           Equivalent to the -v option in automount.


   Automount with Oracle Solaris Trusted Extensions
       If a system is configured with Oracle Solaris Trusted Extensions, users
       have home directories at each label within their clearance. Therefore a
       home  directory  needs  to  be  available in each corresponding labeled
       zone. Instead of using the auto_home map, a special  map  is  automati‐
       cally  generated, using the zone's name as a suffix. By default the map
       contains the single entry:

         -fstype=lofs   :/export/home/&



       When a home directory is referenced and the name  does  not  match  any
       other  keys  in  the  zone's auto_home_zonename map, it will match this
       loopback mount specification. If this loopback  match  occurs  and  the
       name corresponds to a valid user whose home directory does not exist in
       the zone, the directory is automatically created on behalf of the user.


       It  is  also possible to share home directories in a zone, in read-only
       mode, with higher-level zones, using NFS. In  this  case,  the  higher-
       level  zone  needs  to  have an automap entry for each lower-level zone
       that is to be imported. A typical map entry for the public zone, to  be
       interpreted in the internal zone, would be called auto_home_public, and
       would look like this:

         +auto_home_public

         public-zone-IP-address:/export/home/&



       This  automap entry would then be included in /etc/auto_master, as fol‐
       lows:

         /zone/public/home      auto_home_public      -nobrowse



       Users in higher-level zones can use the updatehome(1) utility  to  syn‐
       chronize specific startup files using their minimum labeled zone as the
       source.

OPTIONS
       The following options are supported:

       -t duration    Specifies  a duration, in seconds, that a file system is
                      to remain mounted when not in use.  The  default  is  10
                      minutes.


       -v             Verbose  mode.  Notifies  of autofs mounts, unmounts, or
                      other non-essential information.


USAGE
   Map Entry Format
       A simple map entry (mapping) takes the form:

         key [ -mount-options ] location ...



       where key is the full pathname of the directory to mount when used in a
       direct map, or the simple name of a subdirectory in  an  indirect  map.
       mount-options  is a comma-separated list of mount options, and location
       specifies a file system from which the directory may be mounted. In the
       case of a simple NFS mount, the options that can be used are as  speci‐
       fied in mount_nfs(8), and location takes the form:

         host:pathname



       host  is  the name of the host from which to mount the file system, and
       pathname is the absolute pathname of the directory to mount.


       Options to other file systems are documented on the other mount_*  ref‐
       erence manual pages, for example, mount_nfs(8).

   Replicated File Systems
       Multiple  location fields can be specified for replicated NFS file sys‐
       tems, in which case automount and the kernel will each try to use  that
       information  to  increase availability. If the read-only flag is set in
       the map entry, automountd mounts a list of locations  that  the  kernel
       may  use, sorted by several criteria. Only locations available at mount
       time will be mounted, and thus be  available  to  the  kernel.  When  a
       server does not respond, the kernel will switch to an alternate server.
       The sort ordering of automount is used to determine how the next server
       is  chosen.  If the read-only flag is not set, automount will mount the
       best single location, chosen by the same sort ordering, and new servers
       will only be chosen when an unmount has been possible, and a remount is
       done. Servers on the same local subnet are given the strongest  prefer‐
       ence, and servers on the local net are given the second strongest pref‐
       erence.  Among  servers equally far away, response times will determine
       the order if no weighting factors (see below) are used.


       If the list includes server locations using both the NFS Version 2 Pro‐
       tocol and the NFS Version 3 Protocol, automount will choose only a sub‐
       set of the server locations on the list, so that all  entries  will  be
       the same protocol. It will choose servers with the NFS Version 3 Proto‐
       col  so long as an NFS Version 2 Protocol server on a local subnet will
       not be ignored. See the Administering TCP/IP  Networks,  IPMP,  and  IP
       Tunnels in Oracle Solaris 11.4 for additional details.


       If each location in the list shares the same pathname then a single lo‐
       cation may be used with a comma-separated list of hostnames:

         hostname,hostname...:pathname



       Requests  for  a  server may be weighted, with the weighting factor ap‐
       pended to the server name as an integer in parentheses. Servers without
       a weighting are assumed to have a value of zero (most likely to be  se‐
       lected).  Progressively  higher values decrease the chance of being se‐
       lected. In the example,

         man -ro alpha,bravo,charlie(1),delta(4):/usr/man



       hosts alpha and bravo have the highest priority;  host  delta  has  the
       lowest.


       Server  proximity takes priority in the selection process. In the exam‐
       ple above, if the server delta is on the same network  segment  as  the
       client,  but  the  others are on different network segments, then delta
       will be selected; the weighting value is ignored. The weighting has ef‐
       fect only when selecting between servers with the same network  proxim‐
       ity. The automounter always selects the localhost over other servers on
       the same network segment, regardless of weighting.


       In  cases where each server has a different export point, the weighting
       can still be applied. For example:

         man -ro alpha:/usr/man  bravo,charlie(1):/usr/share/man
              delta(3):/export/man



       A mapping can be continued across input lines by escaping  the  NEWLINE
       with  a  backslash (\) Comments begin with a number sign (#) and end at
       the subsequent NEWLINE.

   Map Key Substitution
       The ampersand (&) character is expanded to the value of the  key  field
       for the entry in which it occurs. In this case:

         jane sparcserver:/home/&



       the & expands to jane.

   Wildcard Key
       The  asterisk  (*) character, when supplied as the key field, is recog‐
       nized as the catch-all entry. Such an entry will match any key not pre‐
       viously matched. For instance, if the following entry appeared  in  the
       indirect map for /config:

         *         &:/export/config/&



       this  would allow automatic mounts in /config of any remote file system
       whose location could be specified as:

         hostname:/export/config/hostname



       Note that the wildcard key  does  not  work  in  conjunction  with  the
       -browse option.

   Variable Substitution
       Client  specific variables can be used within an automount map. For in‐
       stance, if $HOST appeared within a map, automount would  expand  it  to
       its current value for the client's host name. Supported variables are:

       tab(); lw(1.07i) lw(2.6i) lw(1.83i) ARCHThe output of archT{ The archi‐
       tecture  name.  For example, sun4 on a sun4v machine.  T} CPUThe output
       of uname  -pThe processor type.  For example, "sparc" HOSTThe output of
       uname  -nThe host name.  For example, myhost.  KARCHThe output of  arch
       -k or uname -mT{ The kernel architecture name or machine hardware name.
       For example, sun4v.  T}

       OSNAMEThe  output  of  uname   -sThe OS name.  For example, "SunOS" OS‐
       RELThe output of uname  -rThe OS release name.  For example "5.11"  OS‐
       VERSThe  output  of  uname   -vThe  OS version.  For example, "beta1.0"
       NATISAThe output of isainfo  -nT{ The native instruction set  architec‐
       ture  for  the system.  T} For example, "sparcv9" PLATFORMThe output of
       uname -iThe platform name.  For example, "sun4v".



       If a reference needs to be protected from affixed characters,  you  can
       surround the variable name with curly braces ({}).

   Multiple Mounts
       A multiple mount entry takes the form:

         key [-mount-options] [[mountpoint] [-mount-options] location...]...



       The initial /[mountpoint] is optional for the first mount and mandatory
       for  all subsequent mounts. The optional mountpoint is taken as a path‐
       name relative to the directory named by key. If mountpoint  is  omitted
       in the first occurrence, a mountpoint of / (root) is implied.


       Given an entry in the indirect map for /src

         beta     -ro\
           /           svr1,svr2:/export/src/beta  \
           /1.0        svr1,svr2:/export/src/beta/1.0  \
           /1.0/man    svr1,svr2:/export/src/beta/1.0/man



       All  offsets  must exist on the server under beta. automount will auto‐
       matically mount /src/beta,  /src/beta/1.0,  and  /src/beta/1.0/man,  as
       needed,  from  either  svr1  or svr2, whichever host is nearest and re‐
       sponds first.

   Other File System Types
       The automounter assumes NFS mounts as a default file system type. Other
       file system types can be described using the fstype mount option. Other
       mount options specific to this file system type can  be  combined  with
       the fstype option. The location field must contain information specific
       to  the  file system type. If the location field begins with a slash, a
       colon character must be prepended, for instance, to  mount  a  CD  file
       system:

         cdrom -fstype=hsfs,ro :/dev/sr0



       or to perform an autofs mount:

         src -fstype=autofs auto_src



       Use this procedure only if you are not using Volume Manager.


       See the NOTES section for information on option inheritance.

   Indirect Maps
       An  indirect  map allows you to specify mappings for the subdirectories
       you wish to mount under the directory indicated on the command line. In
       an indirect map, each key consists of a simple name that refers to  one
       or more file systems that are to be mounted as needed.

   Direct Maps
       Entries  in  a  direct  map  are  associated directly with autofs mount
       points. Each key is the full pathname of an autofs mount point. The di‐
       rect map as a whole is not associated with any single directory.


       Direct maps are distinguished from indirect maps by the /- key. For ex‐
       ample:

         # Master map for automounter
         #
         +auto_master
         /net            -hosts          -nosuid,nobrowse
         /home           auto_home       -nobrowse
         /-              auto_direct


   Included Maps
       The contents of another map can be included within a map with an  entry
       of the form

         +mapname



       If  mapname  begins with a slash, it is assumed to be the pathname of a
       local file. Otherwise, the location of the map  is  determined  by  the
       policy  of the name service switch according to the entry for the auto‐
       mounter in nsswitch.conf(5), such as

         automount: files nis



       If the name service is files, then the name is assumed to be that of  a
       local  file  in /etc. If the key being searched for is not found in the
       included map, the search continues with the next entry.

   Special Maps
       There are three special maps available: -hosts, -fedfs and  -null.  The
       -hosts map is used with the /net directory and assumes that the map key
       is  the  hostname  of  an NFS server. The automountd daemon dynamically
       constructs a map entry from the server's list of exported file systems.
       References to a directory under /net/hermes will refer  to  the  corre‐
       sponding directory relative to hermes root.


       The  -fedfs  map  is used with the /nfs4 directory and assumes that the
       map key is the DNS domain for  which  the  domain  root  filesystem  is
       needed.  The  automountd daemon looks up the domain root servers with a
       query equivalent to:

         % nslookup -q=srv _nfs4._domainroot._tcp.domain



       ...and mounts server-list:/.domainroot-domain at /nfs4/domain.


       This supports the pending IETF standard documented in:

         https://datatracker.ietf.org/doc/rfc6641/



       The -null map cancels a previous map for the directory indicated.  This
       is  most  useful  in  the  /etc/auto_master for cancelling entries that
       would otherwise be inherited from the +auto_master include entry. To be
       effective, the -null entries must be inserted before the  included  map
       entry.

   Executable Maps
       Local maps that have the execute bit set in their file permissions will
       be  executed by the automounter and provided with a key to be looked up
       as an argument. The executable map is expected to return the content of
       an automounter map entry on its stdout or no output if the entry cannot
       be determined. A direct map cannot be made executable.

   Configuration and the auto_master Map
       When initiated without arguments, automount consults the master map for
       a list of autofs mount points and their  maps.  It  mounts  any  autofs
       mounts  that  are  not already mounted, and unmounts autofs mounts that
       have been removed from the master map or direct map.


       The master map is assumed to be called auto_master and its location  is
       determined  by  the name service switch policy. Normally the master map
       is located initially as a local file /etc/auto_master.

   Browsing
       The automount daemon supports browsability of indirect maps.  This  al‐
       lows  all  of  the potential mount points to be visible, whether or not
       they are mounted. The -nobrowse option can be  added  to  any  indirect
       autofs map to disable browsing. For example:

         /net     -hosts      -nosuid,nobrowse
         /home    auto_home



       In  this  case,  any hostnames would only be visible in /net after they
       are mounted, but all potential mount  points  would  be  visible  under
       /home.  The -browse option enables browsability of autofs file systems.
       This is the default for all indirect maps.


       The -browse option does not work in conjunction with the wildcard key.

   Restricting Mount Maps
       Options specified for a map are used as the default options for all the
       entries in that map. They are ignored when map  entries  specify  their
       own mount options.


       In  some  cases,  however,  it is desirable to force nosuid, nodevices,
       nosetuid, or noexec for a complete mount map and  its  submounts.  This
       can be done by specifying the additional mount option, -restrict.

         /home     auto_home       -restrict,nosuid,hard



       The  -restrict option forces the inheritance of all the restrictive op‐
       tions nosuid, nodevices, nosetuid, and noexec as well as  the  restrict
       option  itself. In this particular example, the nosuid and restrict op‐
       tion are inherited but the hard option is not. The restrict option also
       prevents the execution of "executable maps" and is  enforced  for  auto
       mounts established by programs with fewer than all privileges available
       in their zone.

EXIT STATUS
       The following exit values are returned:

       0    Successful completion.


       1    An error occurred.


FILES
       /etc/auto_master    Master automount map.


       /etc/auto_home      Map to support automounted home directories.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/file-system/autofs


SEE ALSO
       isainfo(1), ls(1), svcs(1), uname(1), updatehome(1),  nsswitch.conf(5),
       attributes(7),     nfssec(7),    smf(7),    automountd(8),    mount(8),
       mount_nfs(8), sharectl(8), svcadm(8)


       Managing Network File Systems in Oracle Solaris 11.4

NOTES
       autofs mount points must not be hierarchically related. automount  does
       not  allow  an  autofs  mount point to be created within another autofs
       mount.


       Since each direct map entry results in a new  autofs  mount  such  maps
       should be kept short.


       Entries  in  both direct and indirect maps can be modified at any time.
       The new information is used when automountd next uses the map entry  to
       do a mount.


       New  entries added to a master map or direct map will not be useful un‐
       til the automount command is run to install them as  new  autofs  mount
       points. New entries added to an indirect map may be used immediately.


       As  of the Solaris 2.6 release, a listing (see ls(1)) of the autofs di‐
       rectory associated with an indirect map shows all  potential  mountable
       entries. The attributes associated with the potential mountable entries
       are  temporary. The real file system attributes will only be shown once
       the file system has been mounted.


       Default mount options can be assigned to an entire map  when  specified
       as  an optional third field in the master map. These options apply only
       to map entries that have no mount options. Note that map entities  with
       options  override  the default options, as at this time, the options do
       not concatenate. The concatenation feature is planned for a future  re‐
       lease.


       When  operating  on a map that invokes an NFS mount, the default number
       of retries for the automounter is 0, that is, a single  mount  attempt,
       with no retries. Note that this is significantly different from the de‐
       fault (10000) for the mount_nfs(8) utility.


       The  Network Information Service (NIS) was formerly known as Sun Yellow
       Pages (YP). The functionality of the two remains the same.

Oracle Solaris 11.4               6 Oct 2022                      automount(8)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3