


MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



NAME
     mount, umount - mount and unmount file systems

SYNOPSIS
     /usr/etc/mount [ -p ]
     /usr/etc/mount -a [ fnv ] [ -t _t_y_p_e ]
     /usr/etc/mount [ -fnrv ] [ -t _t_y_p_e ] [ -o _o_p_t_i_o_n_s ] _f_i_l_e_s_y_s_-
     _t_e_m _d_i_r_e_c_t_o_r_y
     /usr/etc/mount [ -vfn ] [ -o _o_p_t_i_o_n_s ] _f_i_l_e_s_y_s_t_e_m  |  _d_i_r_e_c_-
     _t_o_r_y
     /usr/etc/mount -d [ fnvr ] [ -o  _o_p_t_i_o_n_s  ]  _R_F_S-_r_e_s_o_u_r_c_e  |
     _d_i_r_e_c_t_o_r_y

     /usr/etc/umount [ -t _t_y_p_e ] [ -h _h_o_s_t ]
     /usr/etc/umount -a [ v ]
     /usr/etc/umount [ -v ] _f_i_l_e_s_y_s_t_e_m|_d_i_r_e_c_t_o_r_y  ...
     /usr/etc/umount [ -d ] _R_F_S-_r_e_s_o_u_r_c_e | _d_i_r_e_c_t_o_r_y

DESCRIPTION
     mount attaches a named _f_i_l_e_s_y_s_t_e_m to the file system hierar-
     chy  at  the pathname location _d_i_r_e_c_t_o_r_y, which must already
     exist.  If _d_i_r_e_c_t_o_r_y has any contents  prior  to  the  mount
     operation,  these remain hidden until the _f_i_l_e_s_y_s_t_e_m is once
     again   unmounted.    If   _f_i_l_e_s_y_s_t_e_m   is   of   the   form
     _h_o_s_t:_p_a_t_h_n_a_m_e,  it is assumed to be an NFS file system (type
     nfs).

     umount unmounts a currently mounted file system,  which  can
     be specified either as a _d_i_r_e_c_t_o_r_y or a _f_i_l_e_s_y_s_t_e_m.

     mount and umount maintain a table of mounted file systems in
     /etc/mtab,  described  in  fstab(5).   If invoked without an
     argument, mount displays the  contents  of  this  table.  If
     invoked  with  either  a _f_i_l_e_s_y_s_t_e_m or _d_i_r_e_c_t_o_r_y only, mount
     searches the file  /etc/fstab  for  a  matching  entry,  and
     mounts  the file system indicated in that entry on the indi-
     cated directory.

     mount also allows the creation of new, virtual file  systems
     using loopback mounts.  Loopback file systems provide access
     to existing files using alternate pathnames.  Once a virtual
     file  system  is  created, other file systems can be mounted
     within it without affecting the original file system.   File
     systems that are subsequently mounted onto the original file
     system, however, are visible to  the  virtual  file  system,
     unless or until the corresponding mount point in the virtual
     file system is covered by a file system mounted there.

     Recursive traversal of loopback mount points is not allowed;
     after   the   loopback   mount  of  /tmp/newroot,  the  file
     /tmp/newroot/tmp/newroot does not contain yet  another  file
     system  hierarchy.   Rather, it appears just as /tmp/newroot



Sun Release 4.1   Last change: 19 October 1988                  1






MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



     did before the loopback mount  was  performed  (say,  as  an
     empty directory).

     The standard RC files first perform  4.2  mounts,  then  nfs
     mounts,  during  booting.  On Sun386i systems, lo (loopback)
     mounts are performed  just  after  4.2  mounts.   /etc/fstab
     files  depending on alternate mount orders at boot time will
     fail  to  work  as   expected.    Manual   modification   of
     /etc/rc.local will be needed to make such mount orders work.

     See lofs(4S) and fstab(5) for more information and  WARNINGS
     about loopback mounts.

OPTIONS
  mount
     -p   Print the list of mounted  file  systems  in  a  format
          suitable for use in /etc/fstab.

     -a   All.  Attempt to mount all the file  systems  described
          in  /etc/fstab.   If  a _t_y_p_e argument is specified with
          -t, mount all file systems of  that  type.   Using  -a,
          mount  builds  a  dependency  tree  of  mount points in
          /etc/fstab.  mount will correctly mount these file sys-
          tems  regardless  of  their order in /etc/fstab (except
          loopback mounts; see WARNINGS below).

     -f   Fake an /etc/mtab entry, but do not actually mount  any
          file systems.

     -n   Mount the  file  system  without  making  an  entry  in
          /etc/mtab.

     -v   Verbose.  Display a message indicating each file system
          being mounted.

     -t _t_y_p_e
          Specify a file system type.   The  accepted  types  are
          4.2,  nfs,  rfs, lo, hsfs, and tmp.  See fstab(5) for a
          description of 4.2, hsfs, and nfs; see lofs(4S)  for  a
          description  of  lo; and see tmpfs(4) for a description
          of tmp.  See  _S_y_s_t_e_m  _a_n_d  _N_e_t_w_o_r_k  _A_d_m_i_n_i_s_t_r_a_t_i_o_n  for
          details on rfs.

     -r   Mount the specified file system read-only, even if  the
          entry  in /etc/fstab specifies that it is to be mounted
          read-write.

          Physically write-protected and magnetic-tape file  sys-
          tems  must be mounted read-only. Otherwise errors occur
          when the system attempts to update access  times,  even
          if no write operation is attempted.




Sun Release 4.1   Last change: 19 October 1988                  2






MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



     -d   Mount an RFS file system. This option provides compati-
          bility  with  the  System  V,  Release 3 syntax for RFS
          mounts. Alternatively, the equivalent  Sun  syntax,  -t
          rfs, may be used.

     -o _o_p_t_i_o_n_s
          Specify file system _o_p_t_i_o_n_s, a comma-separated list  of
          words  from the list below.  Some options are valid for
          all file system types, while others apply to a specific
          type only.

          _o_p_t_i_o_n_s valid on _a_l_l file systems:

               rw|ro         Read/write or read-only.
               suid|nosuid   Setuid execution allowed  or  disal-
                             lowed.
               grpid         Create files with BSD semantics  for
                             the  propagation  of  the  group ID.
                             Under this option, files inherit the
                             GID  of  the directory in which they
                             are  created,  regardless   of   the
                             directory's set-GID bit.
               noauto        Do not mount this file  system  that
                             is  currently mounted read-only.  If
                             the file  system  is  not  currently
                             mounted, an error results.
               remount       If  the  file  system  is  currently
                             mounted,   and   if   the  entry  in
                             /etc/fstab specifies that it  is  to
                             be  mounted  read-write  or  rw  was
                             specified   along   with    remount,
                             remount  the  file  system making it
                             read-write.    If   the   entry   in
                             /etc/fstab  specifies  that it is to
                             be mounted read-only and rw was  not
                             specified,  the  file  system is not
                             remounted.  If the  file  system  is
                             currently mounted read-write, speci-
                             fying ro along with remount  results
                             in  an error.  If the file system is
                             not  currently  mounted,  an   error
                             results.

               The default is `rw,suid'.

          _o_p_t_i_o_n_s specific to 4.2 file systems:

               quota|noquota  Usage limits are enforced,  or  are
                              not   enforced.    The  default  is
                              noquota.





Sun Release 4.1   Last change: 19 October 1988                  3






MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



          _o_p_t_i_o_n_s specific to nfs (NFS) file systems:

               bg|fg         If the first attempt fails, retry in
                             the  background,  or,  in  the fore-
                             ground.
               noquota       Prevent   quota(1)   from   checking
                             whether  the  user  is over quota on
                             this file system; if the file system
                             has  quotas  enabled  on the server,
                             quotas will  still  be  checked  for
                             operations on this file system.
               retry=_n       The number of  times  to  retry  the
                             mount operation.
               rsize=_n       Set the read buffer size to _n bytes.
               wsize=_n       Set  the  write  buffer  size  to  _n
                             bytes.
               timeo=_n       Set the NFS timeout to _n tenths of a
                             second.
               retrans=_n     The number of NFS retransmissions.
               port=_n        The server IP port number.
               soft|hard     Return an error if the  server  does
                             not  respond,  or continue the retry
                             request until the server responds.
               intr          Allow keyboard  interrupts  on  hard
                             mounts.
               secure        Use a more secure protocol  for  NFS
                             transactions.
               posix         Request POSIX.1  semantics  for  the
                             file  system.  Requires a mount ver-
                             sion 2 mountd(8C) on the server.
               acregmin=_n    Hold cached attributes for at  least
                             _n seconds after file modification.
               acregmax=_n    Hold cached attributes for  no  more
                             than  _n seconds after file modifica-
                             tion.
               acdirmin=_n    Hold cached attributes for at  least
                             _n seconds after directory update.
               acdirmax=_n    Hold cached attributes for  no  more
                             than   _n   seconds  after  directory
                             update.
               actimeo=_n     Set _m_i_n and _m_a_x  times  for  regular
                             files and directories to _n seconds.
               nocto         Suppress fresh attributes when open-
                             ing a file.
               noac          Suppress attribute and name (lookup)
                             caching.

               Regular defaults are:
                    fg,retry=10000,timeo=7,retrans=3,port=NFS_PORT,hard,\
                    acregmin=3,acregmax=60,acdirmin=30,acdirmax=60





Sun Release 4.1   Last change: 19 October 1988                  4






MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



               actimeo has no default; it sets  acregmin,  acreg-
               max, acdirmin and acdirmax

               Defaults for rsize and wsize are set internally by
               the system kernel.

          _o_p_t_i_o_n_s specific to rfs (RFS) file systems:

               bg|fg         If the first attempt fails, retry in
                             the  background,  or,  in  the fore-
                             ground.
               retry=_n       The number of  times  to  retry  the
                             mount operation.

               Defaults are the same as for NFS.

  umount
     -h _h_o_s_t
          Unmount all file systems listed in /etc/mtab  that  are
          remote-mounted from _h_o_s_t.

     -t _t_y_p_e
          Unmount all file systems listed in /etc/mtab  that  are
          of a given _t_y_p_e.

     -a   Unmount all file systems currently mounted  (as  listed
          in /etc/mtab).

     -v   Verbose.  Display a message indicating each file system
          being unmounted.

     -d   Unmount an RFS file system.  This option provides  com-
          patibility  with  the  System  V,  Release 3 syntax for
          unmounting an RFS file system.

NFS FILESYSTEMS
  Background vs. Foreground
     Filesystems mounted with the bg option indicate  that  mount
     is  to  retry in the background if the server's mount daemon
     (mountd(8C)) does not respond.  mount retries the request up
     to the count specified in the retry=_n option.  Once the file
     system is mounted, each NFS request made in the kernel waits
     timeo=_n  tenths  of a second for a response.  If no response
     arrives, the time-out is multiplied by 2 and the request  is
     retransmitted.   When  the  number  of  retransmissions  has
     reached the number specified in the retrans=_n option, a file
     system  mounted with the soft option returns an error on the
     request; one mounted with the hard option prints  a  warning
     message and continues to retry the request.

  Read-Write vs. Read-Only




Sun Release 4.1   Last change: 19 October 1988                  5






MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



     File systems that are mounted rw (read-write) should use the
     hard option.

  Interrupting Processes With Pending NFS Requests
     The intr option allows keyboard interrupts to kill a process
     that  is hung while waiting for a response on a hard-mounted
     file system.

  Quotas
     Quota checking on NFS  file  systems  is  performed  by  the
     server,  not  the  client;  if the file system has the quota
     option on the server, quota checking is performed  for  both
     local  requests  and  NFS  requests.   When  a user logs in,
     login(1) runs the quota(1) program to check whether the user
     is  over  their  quota on any of the file systems mounted on
     the machine.  This check is performed for NFS  file  systems
     by an RPC call to the rquotad(8C) server on the machine from
     which the  file  system  is  mounted.   This  can  be  time-
     consuming, especially if the remote machine is down.  If the
     noquota option is specified for an NFS  file  system,  quota
     will  not check whether the user is over their quota on that
     file system, which can speed up the process of  logging  in.
     This  does _n_o_t disable quota checking for operations on that
     file system; it merely disables reporting whether  the  user
     is over quota on that file system.

  Secure Filesystems
     The secure option must  be  given  if  the  server  requires
     secure mounting for the file system.

  File Attributes
     The attribute cache retains file attributes on  the  client.
     Attributes  for a file are assigned a time to be flushed. If
     the file is modified before the flush time, then  the  flush
     time  is  extended  by  the time since the last modification
     (under the assumption that files that changed  recently  are
     likely  to  change  soon).   There  is a minimum and maximum
     flush time extension for regular files and for  directories.
     Setting  actimeo=_n  extends flush time by _n seconds for both
     regular files and directories.

SYSTEM V COMPATIBILITY
  System V File-Creation Semantics
     Ordinarily, when a file is created its GID  is  set  to  the
     effective  GID of the calling process.  This behavior may be
     overridden on a per-directory basis, by setting the  set-GID
     bit of the parent directory; in this case, the GID is set to
     the  GID  of  the  parent  directory   (see   open(2V)   and
     mkdir(2V)).   Files created on file systems that are mounted
     with the grpid option will obey BSD semantics; that is,  the
     GID  is  unconditionally  inherited  from that of the parent
     directory.



Sun Release 4.1   Last change: 19 October 1988                  6






MOUNT(8)              MAINTENANCE COMMANDS               MOUNT(8)



EXAMPLES
          To mount a local disk:
               mount /dev/xy0g /usr
          To fake an entry for nd root:
               mount -ft 4.2 /dev/nd0 /
          To mount all 4.2 file systems:
               mount -at 4.2
          To mount a remote file system:
               mount -t nfs serv:/usr/src /usr/src
          To mount a remote file system:
               mount serv:/usr/src /usr/src
          To hard mount a remote file system:
               mount -o hard serv:/usr/src /usr/src
          ground on failure:
          To mount an RFS remote file system, retrying  in  the  back-
               mount -d -o bg SRC /usr/src
          To mount an RFS remote file system read-only:
               mount -t rfs -r SRC /usr/src
          To save current mount state:
               mount -p > /etc/fstab
               Note: this is not  recommended  when  running  the
               automounter, see automount(8).
          To loopback mount file systems:
               mount -t lo /export/tmp/localhost /tmp
               mount -t lo /export/var/localhost /var lo
               mount -t lo /export/cluster/sun386.sunos4.0.1 /usr/cluster
               mount -t lo /export/local/sun386 /usr/local

FILES
     /etc/mtab           table of mounted file systems
     /etc/fstab          table of file systems mounted at boot

WARNINGS
     mount does  not  understand  the  mount  order  dependencies
     involved  in  loopback  mounting.   Loopback  mounts  may be
     dependent on two mounts having  been  previously  performed,
     while nfs and 4.2 mounts are dependent only on a single pre-
     vious mount.  As a rule of thumb, place loopback  mounts  at
     the end of the /etc/fstab file.  See lofs(4S) for a complete
     description.

SEE ALSO
     mkdir(2V),  mount(2V),  open(2V),   unmount(2V),   lofs(4S),
     fstab(5), mtab(5), automount(8), mountd(8C), nfsd(8)

BUGS
     Mounting file systems full of garbage crashes the system.

     If the directory on which a file system is to be mounted  is
     a symbolic link, the file system is mounted on _t_h_e _d_i_r_e_c_t_o_r_y
     _t_o _w_h_i_c_h _t_h_e _s_y_m_b_o_l_i_c _l_i_n_k _r_e_f_e_r_s, rather than being mounted
     on top of the symbolic link itself.



Sun Release 4.1   Last change: 19 October 1988                  7



