MOUNT(8) MachTen Programmer’s Manual MOUNT(8)

NAME
mount, umount - mount and dismount file systems

SYNOPSIS
mount [ -afrwu ] [ -t nfs | ufs | external_type ]
mount [ -frwu ] special | node
mount [ -frwu ] [ -t nfs | ufs | external_type ] [ -o
options ] special node

umount [ -af ] [ -t nfs | ufs | external_type ]
umount [ -f ] special | node

DESCRIPTION
Mount announces to the system that a removable file system
is present on the block device special 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 special 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 /sbin/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:
/sbin/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 options 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 options is
useful for a server that has file systems con-
taining special devices for architectures
other than its own.

synchronous All I/O to the file system should be done syn-
chronously.

data_fork All file system I/O focuses on Macintosh data
fork data. Macintosh resource fork data is
ignored.

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 pro-
cesses 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 inter-
vals.

Umount announces to the system that the removable file
system node or whatever removable file system was previ-
ously mounted on device special should be removed. 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 indi-
cate that the actions should only be taken on filesystems
of the specified type. More than one type may be speci-
fied in a comma separated list. The list of filesystem
types can be prefixed with ‘‘no’’ to specify the filesys-
tem types on which no action should be taken. For exam-
ple, 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 sys-
tems. 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 pre-
fixed 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)

BUGS
Mounting garbaged file systems will crash the system.

Mounting a root directory on a non-directory makes some
apparently good path names invalid.

MachTen June 24, 1990 3