4.3BSD-UWisc/man/cat8/mount.8

Compare this file to the similar file:
Show the results in this format:




MOUNT(8)            UNIX Programmer's Manual             MOUNT(8)



NAME
     mount, umount - mount and dismount filesystems

SYNOPSIS
     /etc/mount [ -p ]
     /etc/mount -a[fv] [ -t _t_y_p_e ]
     /etc/mount [ -frv ] [ -t _t_y_p_e ] [ -o _o_p_t_i_o_n_s ] _f_s_n_a_m_e _d_i_r
     /etc/mount [ -vf ] _f_s_n_a_m_e | _d_i_r

     /etc/umount [ -h _h_o_s_t ]
     /etc/umount -a[v]
     /etc/umount [ -v ]

DESCRIPTION
     _m_o_u_n_t announces to the system that a filesystem _f_s_n_a_m_e is to
     be attached to the file tree at the directory _d_i_r.  The
     directory _d_i_r must already exist.  It becomes the name of
     the newly mounted root.  The contents of _d_i_r are hidden
     until the filesystem is unmounted.  If _f_s_n_a_m_e is of the form
     host:path the filesystem type is assumed to be _n_f_s(4).

     _U_m_o_u_n_t announces to the system that the filesystem _f_s_n_a_m_e
     previously mounted on directory _d_i_r should be removed.
     Either the filesystem name or the mounted-on directory may
     be used.

     _m_o_u_n_t and _u_m_o_u_n_t maintain a table of mounted filesystems in
     /_e_t_c/_m_t_a_b, described in _m_t_a_b(5).  If invoked without an
     argument, _m_o_u_n_t displays the table.  If invoked with only
     one of _f_s_n_a_m_e or _d_i_r mount searches the file /_e_t_c/_f_s_t_a_b (see
     _f_s_t_a_b(5)) for an entry whose _d_i_r or _f_s_n_a_m_e field matches the
     given argument.  For example, if this line is in /_e_t_c/_f_s_t_a_b:

          /dev/xy0g /usr 4.2 rw 1 1

     then the commands mount /usr and mount /dev/xy0g are short-
     hand for mount /dev/xy0g /usr

MOUNT OPTIONS
     -p   Print the list of mounted filesystems in a format suit-
          able for use in /_e_t_c/_f_s_t_a_b.

     -a   Attempt to mount all the filesystems described in
          /_e_t_c/_f_s_t_a_b. (In this case, _f_s_n_a_m_e and _d_i_r are taken
          from /_e_t_c/_f_s_t_a_b.) If a type is specified all of the
          filesystems in /_e_t_c/_f_s_t_a_b with that type is mounted.
          Filesystems are not necessarily mounted in the order
          listed in /_e_t_c/_f_s_t_a_b .

     -f   Fake a new /_e_t_c/_m_t_a_b entry, but do not actually mount
          any filesystems.




Printed 12/27/86        16 September 1985                       1






MOUNT(8)            UNIX Programmer's Manual             MOUNT(8)



     -v   Verbose - _m_o_u_n_t displays a message indicating the
          filesystem being mounted.

     -t   The next argument is the filesystem type.  The accepted
          types are: 4.2, and nfs; see _f_s_t_a_b(5) for a description
          of these filesystem types.

     -r   Mount the specified filesystem read-only.  This is a
          shorthand for:

               mount -o ro _f_s_n_a_m_e _d_i_r

          Physically write-protected and magnetic tape filesys-
          tems must be mounted read-only, or errors occur when
          access times are updated, whether or not any explicit
          write is attempted.

     -o   Specify _o_p_t_i_o_n_s , a list of comma seperated words from
          the list below.  Some options are valid for all
          filesystem types, while others apply to a specific type
          only.
9
          _o_p_t_i_o_n_s valid on _a_l_l file systems (the default is
          rw,suid):

          rw     read/write.

          ro     read-only.

          suid   set-uid execution allowed.

          nosuid set-uid execution not allowed.

          hide   ignore this entry during a mount -a command to
                 allow you to define _f_s_t_a_b entries for commonly
                 used filesystems you don't want to automatically
                 mount.
9
          _o_p_t_i_o_n_s specific to 4.2 file systems (the default is
          noquota).

          quota  usage limits enforced.

          noquotausage limits not enforced.
9
          _o_p_t_i_o_n_s specific to nfs (NFS) file systems (the
          defaults are:
9               fg,retry=1,timeo=7,retrans=4,port=NFS_PORT,hard
9          with defaults for _r_s_i_z_e and _w_s_i_z_e set by the kernel):
9


Printed 12/27/86        16 September 1985                       2






MOUNT(8)            UNIX Programmer's Manual             MOUNT(8)



          bg     if the first mount attempt fails, retry in the
                 background.

          fg     retry in foreground.

          retry=_nset number of mount failure retries to _n.

          rsize=_nset read buffer size to _n bytes.

          wsize=_nset write buffer size to _n _b_y_t_e_s.

          timeo=_nset NFS timeout to _n tenths of a second.

          retrans=_n
                 set number of NFS retransmissions to _n.

          port=_n set server IP port number to _n.

          soft   return error if server doesn't respond.

          hard   retry request until server responds.

          The bg option causes _m_o_u_n_t to run in the background if
          the server's _m_o_u_n_t_d(8) does not respond. _m_o_u_n_t attempts
          each request retry=_n times before giving up.  Once the
          filesystem 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 retrans=_n
          retransmissions have been sent with no reply a soft
          mounted filesystem returns an error on the request and
          a hard mounted filesystem retries the request.
          Filesystems that are mounted rw (read-write) should use
          the hard option.  The number of bytes in a read or
          write request can be set with the rsize and wsize
          options.

UMOUNT OPTIONS
     -h _h_o_s_t
          Unmount all filesystems listed in /_e_t_c/_m_t_a_b that are
          remote-mounted from _h_o_s_t.

     -a   Attempt to unmount all the filesystems currently
          mounted (listed in /_e_t_c/_m_t_a_b).  In this case, _f_s_n_a_m_e is
          taken from /_e_t_c/_m_t_a_b.

     -v   Verbose - _u_m_o_u_n_t displays a message indicating the
          filesystem being unmounted.

EXAMPLES
     mount /dev/xy0g /usr                   mount a local disk
     mount -ft 4.2 /dev/nd0 /               fake an entry for nd root



Printed 12/27/86        16 September 1985                       3






MOUNT(8)            UNIX Programmer's Manual             MOUNT(8)



     mount -at 4.2                          mount all 4.2 filesystems
     mount -t nfs serv:/usr/src /usr/src    mount remote filesystem
     mount serv:/usr/src /usr/src           same as above
     mount -o hard serv:/usr/src /usr/src   same as above but hard mount
     mount -p > /etc/fstab                  save current mount state

FILES
     /etc/mtab mount table
     /etc/fstab     filesystem table

SEE ALSO
     mount(2), nfsmount(2), unmount(2), fstab(5), mountd(8c),
     nfsd(8c)

BUGS
     Mounting filesystems full of garbage crashes the system.

     No more than one ND client should mount an ND disk partition
     "read-write" or the file system may become corrupted.

     If the directory on which a filesystem is to be mounted is a
     symbolic link, the filesystem 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.































Printed 12/27/86        16 September 1985                       4