NAME
mount, umount - mount and unmount file systems

SYNOPSIS
mount [ -afrwu ] [ -t nfs | ufs | external_type ]
mount [ -frwu ] <Macintosh volume name> | node
mount [ -frwu ] [ -t nfs | ufs | external_type ] [ -o options ]
<Macintosh volume name> node

umount [ -af ] [ -t nfs | ufs | external_type ]
umount [ -f ] <Macintosh volume name> | node

DESCRIPTION
Mount announces to the system that a file system is present on the
Macintosh volume <Macintosh volume name> or the remote node
"rhost:path". The file node must exist already and it must be a
directory. It becomes the name of the newly mounted root. The
optional arguments -r and -w indicate that the file system is to be
mounted read-only or read-write, respectively. If either
<Macintosh volume name> or file are not provided, the appropriate
information is taken from the fstab file. The -f option causes
everything to be done except for the actual system call; if it’s
not obvious, this "fakes" mounting the file system. This option
is useful in conjunction with the -v flag to determine what the
mount command is trying to do.

The optional argument -t can be used to indicate the file system
type. The type ufs is the default. If the type is not one of the
internally known types, mount will attempt to execute a program in
/bin/mount_XXX where XXX is replaced by the type name. The
standard mount options (see below) are parsed and passed to
external program via the -F option as a decimal number. Any
additional options specific to the program can be passed as a comma
separated list; these options are distinguished by starting with a
- (dash). Those options that take a value are specified using the
syntax -option=value. For example, the mount command:
mount -t mfs -o nosuid,-N,-s=4000 /dev/dk0b /tmp
causes mount to attempt to execute:
/bin/mount_mfs -F 8 -N -s 4000 /dev/dk0b /tmp

Options are specified by a -o argument followed by a comma
separated string of options. The following options apply to any
file system that is being mounted:

noexec Do not allow execution of any binaries on the mounted
file system. This option is useful for a server that
has file systems containing binaries for architectures
other than its own.

nosuid Do not allow set-user-identifier or set-group-
identifier bits to take effect.

nodev Do not interpret character or block special devices on
the file system. This option is useful for a server
that has file systems containing special devices for
architectures other than its own.

synchronous All I/O to the file system should be done
synchronously.

The -u flag indicates that the status of an already mounted file
system should be changed. Any of the options above may be changed;
also a file system can be changed from read-only to read-write.
The set of options is determined by first extracting the options
for the file system from the fstab table, then applying any options
specified by the -o argument, and finally applying the -r or -w
option.

The following list can be used to override the defaults for an nfs
mount:

hard I/O system calls will retry until the server responds
(default)

soft I/O system calls will fail and return errno after
retrans request retransmissions

spongy Soft semantics for the stat, lookup, fsstat, readlink
and readdir filesystem operations and hard semantics
for the others. This option is meant to be similar to
hard, except that processes will not be hung forever
when they trip over mount points to dead servers.

bg If the first mount request times out, do retries in
background

intr I/O system calls can be interrupted.

noconn Do not connect the socket. Used for UDP servers that
send replies from a socket other than the nfs server
socket.

tcp Use TCP transport instead of UDP.

rsize=# Set read size to # bytes.

wsize=# Set write size to # bytes.

retry=# Set mount retry count to #.

retrans=# Set retransmission count for nfs rpc’s to #.

timeo=# Set initial nfs timeout to # in 0.1 sec intervals.

dtnfs Desktop NFS. Make the NFS filesystem appear on the
desktop, for use by Macintosh Applications. See
dtmount(8) for a complete set of options applicable for
Desktop NFS.

Umount announces to the system that the file system mounted on node
or file system <Macintosh volume name> should be unmounted. If the
-f option is specified for umount, the file system is forcibly
unmounted. Active special devices continue to work, but all other
files return errors if further accesses are attempted. The root
file system cannot be forcibly unmounted.

If the -a option is present for either mount or umount, all of the
file systems described in fstab are mounted or unmounted. The
optional argument -t can be used to indicate that the actions
should only be taken on filesystems of the specified type. More
than one type may be specified in a comma separated list. The list
of filesystem types can be prefixed with "no" to specify the
filesystem types on which no action should be taken. For example,
the mount command:
mount -a -t nonfs,mfs
mounts all filesystems except those of type NFS and MFS.

The system maintains a list of currently mounted file systems. If
invoked without an argument, mount prints the list. The optional
argument -t can be used to indicate that only filesystems of the
specified type should be listed. More than one type may be
specified in a comma separated list. The list of filesystem types
can be prefixed with "no" to indicate the types of filesystems to
be excluded from the listing.

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

FILES
/etc/fstab file system table

SEE ALSO
mount(2), unmount(2), fstab(5), dtmount(8)

NOTES
MachTen does not support the MFS type.

Traditional AppleShare volumes will timeout and return an error
code if the connection to the server is lost. To simulate this
behavior when the dtnfs option is specified, the soft option should
also be used.