MOUNT(8) — NEWS-OS Programmer’s Manual
NAME
mount, umount − mount and unmount filesystems
SYNOPSIS
/usr/etc/mount [ −p ]
/usr/etc/mount −a[fnv] [ −t type ]
/usr/etc/mount [ −fnrv ] [ −t type ] [ −o options ] filesystem directory
/usr/etc/mount [ −vnf ] [ −o options ] { filesystem | directory } /usr/etc/umount [ −t type ] [ −h host ]
/usr/etc/umount −a[v]
/usr/etc/umount [ −v ] { filesystem | directory } ...
DESCRIPTION
mount attaches a named filesystem to the filesystem 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 filesystem (type nfs). umount unmounts a currently mounted filesystem, which can be specified either as a directory or a filesystem. mount and umount maintain a table of mounted filesystems in /etc/mtab, described in fstab(5). If invoked without any arguments, 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 filesystem indicated in that entry on the indicated directory.
MOUNT OPTIONS
−p Print the list of mounted filesystems in a format suitable for use in /etc/fstab.
−a Mount all. Attempt to mount all the filesystems described in /etc/fstab. If a type argument is specified with −t, mount all filesystems of that type. Filesystems are not necessarily mounted in the order shown in /etc/fstab.
−f Fake an /etc/mtab entry, but do not actually mount any filesystems.
−n Mount the filesystem without making an entry in /etc/mtab.
−v Verbose mode. Display a message indicating each filesystem being mounted.
−t type
Specify a filesystem type. The accepted types are 4.3, nfs, vdd, cdfs and pcfs. see fstab(5) for a description of these types.
−r Mount the specified filesystem read-only, even if the entry in /etc/fstab specifies that it is to be mounted read-write.
Physically write-protected and magnetic-tape filesystems must be mounted read-only. Otherwise errors occur when the system attempts to update access times, even if no write operation is attempted.
−o options
The options available for file systems are shown below. Specify options on the command line delimited by commas. Some options are valid for all filesystem types, while others apply to a specific type only.
options valid for all filesystems:
rw|ro Specifies read/write or read-only.
suid|nosuid Enables/disables setuid execution.
grpid Create files with BSD semantics for the propagation of the group ID. Under this option, files inherit the GID of the directory in which they are created, regardless of the directory’s set-GID bit.
noauto Do not mount filesystems that are currently mounted read-only. If the filesystem 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 not currently mounted, an error results. The default is ‘rw,suid’.
options enabled only for 4.3 and vdd filesystems:
quota|noquota
Usage limits are enforced, or are not enforced. The default is noquota.
delay All disk write operations are performed as delayed write.
options enabled only for nfs (NFS)filesystems:
bg|fg If the first attempt fails, retry in either the background or in the foreground.
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 second.
retrans=n NFS 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 NFS Use a more secure protocol for NFS transactions.
acregmin=n Hold cached attributes for at least n seconds after file modification.
acdirmin=n Hold cached attributes for at least n seconds after directory update.
actimeo=n Set min and max times for regular files and directories to n seconds. 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.
options enabled only for cdfs file systems:
vdsectSpecifies that the Japanese language support standard proposal of the Electronic Publisher’s Society for Supplementary Volume Descriptors be used.
Use the option "vdsect=17" if there is a Supplementary Volume Descriptor in logical secter 17. If no Supplementray Volume Descriptor is found in the specified sector, a "Device Busy" message will be displayed and the filesystem will not be mounted.
casecnvSpecify this option to invert upper and lower case for filenames and directory names.
syskanjiIf filenames or directory names use Kanji, their codes must be converted within the CDFS to either Shift−JIS or EUC as required by the terminal. In such a case, specify either "syskanji=sjis" or "syskanji=euc". If this option is missing, Shift−JIS is assumed.
versionSpecify this option to to include a filename after the SEPARATOR 2 semicolon.
assocTreats associated files with the file names preceeded by ’@’. Without this option associated files are ignored. The default is ‘syskanji=sjis’.
options only enabled for pcfs filesystems:
eucConvert Shift−JIS MS-DOS file name to/from EUC for environments using EUC. The default is no option.
UMOUNT OPTIONS
−h host
Unmount all filesystems listed in /etc/mtab that are remote-mounted from host.
−t type
Unmount all filesystems listed in /etc/mtab that are of a given type.
−a Unmount all filesystems currently mounted (as listed in /etc/mtab).
−v Specifies verbose mode. Display a message indicating each filesystem being unmounted.
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 by the retry=n option. 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 the number of retransmissions has reached the number specified in the retrans=n option, a filesystem 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
Filesystems 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 filesystem.
Secure Filesystems
secure The secure option must be given if the server requires secure mounting for the filesystem.
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/hp0g /usr
To mount all 4.3 filesystems:
mount −at 4.3
To mount a remote filesystem:
mount −t nfs serv:/usr/src /usr/src
To hard mount a remote filesystem:
mount −o hard serv:/usr/src /usr/src
To save current mount state:
mount −p > /etc/fstab
To mount a CD-ROM drive:
mount −t cdfs /dev/sd06c /cdrom
To mount MS-DOS 720-Kbyte floppy disk:
mount −t pcfs /dev/fd01a /msdos
FILES
/etc/mtabtable of mounted filesystems
/etc/fstabtable of filesystems mounted at boot
SEE ALSO
mkdir(2), mount(2), unmount(2), open(2), fstab(5), mtab(5), mountd(8C), nfsd(8)
BUGS
Mounting filesystems full of garbage crashes the system. If the directory on which a filesystem is to be mounted is a symbolic link, the filesystem is mounted on the directory to which the symbolic link refers, rather than being mounted on top of the symbolic link itself.
NEWS-OSRelease 4.2.1R