mount(1M) DG/UX R4.11MU05 mount(1M)
NAME
mount, umount - mount and dismount file systems
SYNOPSIS
mount [ -p ]
mount -a [ fnv ] [ -t type ]
mount [ -fnrv ] [ -t type ] [ -o options ] file_system directory
mount [ -vfn ] [ -o options ] file_system | directory
umount [ -t type ] [ -h host ] [ -e ]
umount -a [ v ] [ -e ]
umount [ -v ] [ -e ] file_system | directory ...
DESCRIPTION
Use mount to mount file systems, or to display currently mounted file
systems. Use umount to unmount file systems. Alternatively, you may
use the Mount and Unmount operations in the File_System->Local and
File_System->Remote menus of sysadm.
You must have appropriate privilege to mount or umount a file system.
For systems supporting a DG/UX information security option,
appropriate privilege is defined as having one or more specific
capabilities enabled in the effective capability set of the user.
See cap_defaults(5) for the default capabilities for this command.
On systems without a DG/UX information security option, appropriate
privilege means that your process has an effective UID of root. See
the appropriate_privilege(5) man page for more information.
If a mounted file system is a memory-resident file system, you must
remove all of the files and directories that have been added since it
was mounted before using umount.
On a system supporting a DG/UX information security option, mount
will not allow you to mount a file system on a hidden directory.
Thus, if you are in virtual directory mode, you will not be allowed
to mistakenly mount a file system on a multilevel directory (MLD).
umount, on the other hand, changes into real directory mode prior to
unmounting a file system. This releases you from having to go into
real directory mode prior to issuing a umount command.
One consequence of this feature is that mounting a file system under
an MLD is not possible in virtual directory mode. To mount a file
system under an MLD, you must be in real directory mode, and the name
of the appropriate hidden directory must be in the path name of the
file system (including in any entry in /etc/fstab.)
The umount command removes the unmounted file system entry from the
file /etc/mnttab.
The mount command has four formats:
mount [ -p ] With no arguments, it displays currently
mounted file systems.
mount -a [ options ] With no arguments but with the a(ll) switch,
it mounts some or all of the file systems
listed in the file /etc/fstab.
mount [ options ] file_system directory
With two arguments, it mounts the named
file_system on the named directory.
mount [ options ] file_system | directory
With one argument, it mounts the named
file_system or directory, using a matching
command line in the file /etc/fstab.
The umount command has three formats:
umount [ -t type -h host ] [ -e ]
With no arguments, it unmounts file systems of
the specified type or from the specified host,
that are listed in the file /etc/mnttab
umount -a [ v ] [ -e ]
With no argument but with the a(ll) switch, it
unmounts the file systems listed in the file
/etc/mnttab.
umount [ -v ] [ -e ] file_system | directory
With one argument, it unmounts the file system
that is mounted from file_system, or mounted
on directory.
Arguments
The file_system argument names the file system to be mounted or
unmounted. It may be local or remote. To specify a local file system,
enter for file_system a path name that resolves to a local resource,
such as: a disk partition (a virtual disk created with admvdisk), a
tape or cdrom device, or an area of memory. To specify a remote (nfs)
file system, enter the file_system argument as host:pathname, where
host is the remote host's name and pathname is a directory on the
remote host. To specify a partition on a DOS formatted hard disk,
the file_system argument is pathname:partition letter, where pathname
is the path to the DOS hard disk that is being mounted and partition
letter is the partition on the hard disk that is to be mounted (c-z,
with c being the first partition).
The directory argument is the mount point: the path name of a
directory on the local system. The directory must already exist.
Usually, the mount point should be an empty directory: if not empty,
its contents are hidden while the file_system is mounted on it.
If directory is a symbolic link, the file_system is mounted on the
resolution directory rather than on the symbolic link.
If a physically write protected medium is the subject of a read/write
mount, the error ENXIO (no such device or address) results.
Options
-p Display the 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. File systems are not
necessarily mounted in the order shown in /etc/fstab.
-f Fake an /etc/mnttab entry, but do not actually mount any
file systems.
-n Mount the file system without making an entry in
/etc/mnttab.
-v Verbose. Display a message indicating each file system
being mounted.
-t type Specify a file system type. The accepted types are dg/ux,
cdrom, dos, swap, and nfs. See options below for the
arguments relevant for each type; see fstab(4) for a more
detailed description of these types.
-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, magnetic tape, and cdrom file
systems should be mounted read-only. If they are mounted
read-write, errors occur when the system attempts to update
access times, even if no write operation is attempted.
-o options
Specify file system option arguments--one or more comma-
separated words from the list below. Some options are
valid for all file system types, while others apply to a
specific type only.
These option arguments are valid for all file system types:
ro | rw Allow read-only or read-write access. Note:
cdrom file systems are mounted read-only
regardless of this argument.
noauto If this file system is currently mounted
read-only, do not mount it. If the file
system is not currently mounted, display an
error message.
The default for cdrom file systems is ` ro,suid '. For all
other types, the default is ` rw,suid '.
These option arguments are valid for dg/ux file systems:
fsync_on_close Whenever a file in this mounted file
system is closed, write its dirty pages
to disk. This option decreases the
likelihood of data loss in the event of a
system crash, but may degrade
performance.
force_dir_entries Whenever a file in this mounted file
system is created, write the dirty pages
that contain the file's directory entry
to disk. This option decreases the
likelihood that a file flushed to media
will end up in lost+found in the event of
a system crash. Using this option may
degrade performance.
fsck_log_size=n Log changes to system data in a manner
that allows fast recovery by fsck. This
option may degrade performance.
ramdisk Mount a memory-resident file system. See
mfs(4) for a detailed description of
memory-resident file systems.
If the ramdisk argument is present, the following three
arguments are also allowed:
use_wired_memory By default, the data in the memory file
system is subject to being swapped to
disk. Use this argument to prevent
swapping.
max_file_space=n The default number of blocks in a memory
file system is 4096. Use this argument
to set the maximum size to n blocks. No
memory is allocated until it is actually
used. If the use_wired_memory argument
is present, n may exceed the available
memory. If this happens, the system
allocates as many blocks as there are
available, up to n; it does not report an
error.
max_file_count=n The default number of file nodes that can
be allocated in a memory file system is
32768. Use this argument to set the
maximum to n. If the use_wired_memory
argument is present, n may cause
available memory to be exceeded. If this
happens, the system allocates as many
file nodes as available memory allows, up
to n nodes; it does not report an error.
These option arguments are only valid for cdrom file
systems:
noversion ISO-9660 CDs have file names that have a
version number at the end of the name.
This is to allow multiple versions of the
same file to exist in the same directory
with the same base name. To remove the
version number (usually a -1), specify
this option. If there are multiple files
with the same base name, then the first
one found in the directory will be the
only one that is accessible with base
name. The other versions can be
specified by typing in the entire name,
including the version number.
fulliso9660 To display file names with their version
numbers as they appear on the ISO-9660
CD, specify this option. However, on a
DG/UX system, this option will convert
the ";" that separates the filename from
the version number to a "-". Each file
name will appear in upper case, with a
version number if one is present, and
with a trailing ".", if the file name has
no extension. If fulliso9660 and
noversion are both specified, the version
number will not be displayed. When
fulliso9660 is not specified, the file
name is converted to lower case, the
version number is displayed, the trailing
"." is removed unless the file has an
extension, and any extension is
displayed.
These option arguments are valid for nfs (NFS) file
systems:
bg | fg If the first attempt fails, retry in the
background, or, in the foreground.
nosuid Execution of setuid disallowed.
remount The mount characteristics are changed, as
specified with other options. See
EXAMPLES below.
retry=n The number of times to retry the mount
operation.
rsize=n Set the maximum read buffer size to n
bytes.
wsize=n Set the maximum 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 to kill (or
signal) a process that is hung waiting
for a response from a remote server.
noac Suppress caching of attributes.
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 modification.
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 min and max times for regular files
and directories to n seconds.
vers=n Use revision n of the NFS protocol
(either 2 or 3).
Regular defaults are:
fg,retry=10000,timeo=7,retrans=3,port=NFS_PORT,hard,\
acregmin=3,acregmax=60,acdirmin=30,acdirmax=60
Defaults for rsize and wsize are set internally by
the system kernel. Default for vers is negotiated
by the NFS client and server. Typically, the
negotiated value is the highest level of the NFS
protocol supported by both the NFS client and
server.
umount Options
-h host Unmount all file systems listed in /etc/mnttab that are
remote-mounted from host.
-e With the -e flag set, the umount command does not wait for
remote servers to respond when unmounting nfs mounted file
systems. This is useful when a system needs to be shutdown
in a hurry. The -e flag does not solve the problem of long
delays with nested hard mounts. A nested mount is a remote
mount on a mount point that is also a remote mount point.
The remote mount points may be on the same or different
machines. For example, on system A you mount /foo from
system B. Then on system A you mount /bar from system C on
the mount point /foo from system B making /foo/bar. If
system B is down when you attempt to umount /bar on system
C, an indefinite delay in your system shutdown could occur.
Using soft mounts is a solution for read-only file systems.
In general you must avoid nested mounts to insure a timely
shutdown.
-t type Unmount all file systems listed in /etc/mnttab that are of
a given type.
-a Unmount all file systems currently mounted (as listed in
/etc/mnttab).
-v Verbose. Display a message indicating each file system
being unmounted.
DIAGNOSTICS
Exit code is 0 on successful completion and >0 if an error occurs.
NFS FILE SYSTEMS
Background vs. Foreground
File systems mounted with the bg option indicate that mount is to
retry in the background if the server's mount daemon (mountd(1M))
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
File systems that are mounted rw (read-write) should use the hard
option to prevent possible loss of data; and the intr option to
enable keyboard interrupts.
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.
EXAMPLES
To mount a local disk:
mount /dev/dsk/usr /usr
To mount all DG/UX file systems:
mount -at dg/ux
To mount a remote file system:
mount serv:/usr/src /usr/src
To mount a remote file system that is listed in /etc/fstab:
mount /usr/src
To hard mount a remote file system:
mount -o hard serv:/usr/src /usr/src
To save current mount state:
B mount -p > /etc/fstab
To mount a memory file system (the name /dev/mem_tmp is arbitrary and
will be created by the mount command):
mount -o ramdisk /dev/mem_tmp /mnt
To mount a memory file system using wired memory:
mount -o ramdisk,use_wired_memory /dev/mem_tmp2 /memory1
To mount a CD-ROM:
mount -o ro, fulliso9660 /dev/dsk/+usr /usr/src
To remount a file system, suppose the following mount already exists:
newyork:/test on /test type nfs (ro,bg,soft,intr)
The mount characteristics can be changed with the command:
mount -o remount,fg,hard /test
Executing mount | grep newyork will then result in:
newyork:/test on /test type nfs (ro,bg,soft,intr)
newyork:/test on /test type nfs (remount,fg,hard,rw)
FILES
/etc/mnttab table of mounted file systems
/etc/fstab table of file systems mounted at boot
SEE ALSO
fsck(1M), mountd(1M), nfsd(1M), admpdisk(1M), admvdisk(1M),
setdirmode(1M) in security man pages, dg_mount(2), mkdir(2), open(2),
umount(2), fstab(4), fs(4), mfs(4), mnttab(4),
appropriate_privilege(5).
cap_defaults(5).
/usr/include/sys/dg_mount.h, /usr/include/sys/nfs.h.
Licensed material--property of copyright holder(s)