unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

MOUNT(8)                    System Manager's Manual                   MOUNT(8)



NAME
       mount, umount - mount and unmount file systems

SYNOPSIS
       /usr/etc/mount [ -p ]
       /usr/etc/mount -a [ fnv ] [ -t type ]
       /usr/etc/mount  [  -fnrv ] [ -t type ] [ -o options ] filesystem direc-
       tory
       /usr/etc/mount [ -vfn ] [ -o options ] filesystem | directory
       /usr/etc/mount -d [ fnvr ] [ -o options ] RFS-resource | directory

       /usr/etc/umount [ -t type ] [ -h host ]
       /usr/etc/umount -a [ v ]
       /usr/etc/umount [ -v ] filesystem|directory  ...
       /usr/etc/umount [ -d ] RFS-resource | directory

DESCRIPTION
       mount attaches a named filesystem to the file system hierarchy  at  the
       pathname  location  directory,  which must already exist.  If directory
       has any contents prior to the  mount  operation,  these  remain  hidden
       until  the filesystem is once again unmounted.  If filesystem is of the
       form host:pathname, 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 directory or a filesystem.

       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 filesystem or
       directory 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 loop-
       back  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 orig-
       inal 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  sys-
       tem 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 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 loop-
       back 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 type 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  systems  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 sys-
              tems.

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

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

       -t type
              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 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  systems  must
              be  mounted  read-only.  Otherwise  errors occur when the system
              attempts to update access times, even if no write  operation  is
              attempted.

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

       -o options
              Specify  file  system  options,  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.

              options valid on all file systems:

                     rw|ro         Read/write or read-only.
                     suid|nosuid   Setuid execution allowed or disallowed.
                     grpid         Create  files  with  BSD  semantics for the
                                   propagation of the group  ID.   Under  this
                                   option, files inherit the GID of the direc-
                                   tory in which they are created,  regardless
                                   of the directory's set-GID bit.
                     noauto        Do  not mount this file system that is cur-
                                   rently mounted read-only.  If the file sys-
                                   tem  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,  specifying  ro  along
                                   with remount results in an error.   If  the
                                   file  system  is  not currently mounted, an
                                   error results.

                     The default is `rw,suid'.

              options specific to 4.2 file systems:

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

              options specific to nfs (NFS) file systems:

                     bg|fg         If  the  first  attempt fails, retry in the
                                   background, or, in the foreground.
                     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 sec-
                                   ond.
                     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 transac-
                                   tions.
                     posix         Request POSIX.1 semantics for the file sys-
                                   tem.  Requires a mount version 2 mountd(8C)
                                   on the server.
                     acregmin=n    Hold  cached attributes for at least n sec-
                                   onds after file modification.
                     acregmax=n    Hold cached attributes for no more  than  n
                                   seconds after file modification.
                     acdirmin=n    Hold  cached attributes for at least n sec-
                                   onds after directory update.
                     acdirmax=n    Hold cached attributes for no more  than  n
                                   seconds after directory update.
                     actimeo=n     Set min and max times for regular files and
                                   directories to n seconds.
                     nocto         Suppress fresh attributes  when  opening  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

                     actimeo has  no  default;  it  sets  acregmin,  acregmax,
                     acdirmin and acdirmax

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

              options specific to rfs (RFS) file systems:

                     bg|fg         If the first attempt fails,  retry  in  the
                                   background, or, in the foreground.
                     retry=n       The  number  of  times  to  retry the mount
                                   operation.

                     Defaults are the same as for NFS.

              options specific to hsfs (HSFS) file systems:

                     norrip        Disable processing of Rock Ridge extensions
                                   for the file system.

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

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

       -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 compatibility
              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 num-
       ber 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
       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  not
       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.

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
              To mount an RFS remote file system, retrying in  the  background
              on failure:
                     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 auto-
                     mounter, 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 hav-
       ing been previously performed, while nfs and 4.2 mounts  are  dependent
       only  on  a  single previous 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 the directory to which the symbolic
       link refers, rather than being mounted on  top  of  the  symbolic  link
       itself.



                                 19 June 1991                         MOUNT(8)