SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 5.X mount-2.7l-3.i386.rpm

MOUNT

Section: Linux Programmer's Manual (8)
Updated: 14 September 1997
Index 

NAME

mount - mount a file system 

SYNOPSIS

mount [-hV]

mount -a [-fFnrsvw] [-t vfstype]
mount [-fnrsvw] [-o options [,...]] device | dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir 

DESCRIPTION

All files accessible in a Unix system are arranged in one bigtree, the file hierarchy, rooted at/.These files can be spread out over several devices. Themountcommand serves to attach the file system found on some deviceto the big file tree. Conversely, theumount(8)command will detach it again.

The standard form of themountcommand, is


mount -t type device dir
This tells the kernel to attach the file system found ondevice(which is of typetype)at the directorydir.The previous contents (if any) and owner and mode ofdirbecome invisible, and as long as this file system remains mounted,the pathnamedirrefers to the root of the file system ondevice.

Three forms of invocation do not actually mount anything:


mount -h
prints a help message;

mount -V
prints a version string; and just
mount [-t type]
lists all mounted file systems (of typetype)- see below.

Theprocfile system is not associated with a special device, and whenmounting it, an arbitrary keyword, such asproccan be used instead of a device specification.(The customary choicenoneis less fortunate: the error message `none busy' fromumountcan be confusing.)

Most devices are indicated by a file name (of a block special device), like/dev/sda1,but there are other possibilities. For example, in the case of an NFS mount,devicemay look likeknuth.cwi.nl:/dir.

The file/etc/fstab(seefstab(5)),may contain lines describing what devices are usuallymounted where, using which options. This file is used in three ways:

(i) The command


mount -a [-t type]
(usually given in a bootscript) causes all file systems mentioned infstab(of the proper type) to be mounted as indicated, except for thosewhose line contains thenoautokeyword. Adding the-Foption will make mount fork, so that thefilesystems are mounted simultaneously.

(ii) When mounting a file system mentioned infstab,it suffices to give only the device, or only the mount point.

(iii) Normally, only the superuser can mount file systems.However, whenfstabcontains theuseroption on a line, then anybody can mount the corresponding system.

Thus, given a line


/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 file system found on his CDROMusing the command

mount /dev/cdrom
or

mount /cd
For more details, seefstab(5).

The programsmountandumountmaintain a list of currently mounted file systems in the file/etc/mtab.If no arguments are given tomount,this list is printed.When theprocfilesystem is mounted (say at/proc),the files/etc/mtaband/proc/mountshave very similar contents. The former has somewhatmore information, such as the mount options used,but is not necessarily up-to-date (cf. the-noption below). It is possible to replace/etc/mtabby a symbolic link to/proc/mounts,but some information is lost that way, and in particularworking with the loop device will be less convenient.

 

OPTIONS

The full set of options used by an invocation ofmountis determined by first extracting theoptions for the file system from thefstabtable, then applying any options specified by the-oargument, and finally applying a-r or -woption, when present.

Options available for themountcommand:

-V
Output version.
-h
Print a help message.
-v
Verbose mode.
-a
Mount all filesystems (of the given types) mentioned infstab.
-F
(Used in conjunction with-a.)Fork off a new incarnation of mount for each device.This will do the mounts on different devices or different NFS serversin parallel.This has the advantage that it is faster; also NFS timeouts go inparallel. A disadvantage is that the mounts are done in undefined order.Thus, you cannot use this option if you want to mount both/usrand/usr/spool.
-f
Causes everything to be done except for the actual system call; if it's notobvious, this ``fakes'' mounting the file system. This option is useful inconjunction with the-vflag to determine what themountcommand is trying to do. It can also be used to add entries for devicesthat were mounted earlier with the -n option.
-n
Mount without writing in/etc/mtab.This is necessary for example when/etcis on a read-only file system.
-s
Tolerate sloppy mount options rather than failing. This will ignoremount options not supported by a filesystem type. Not all filesystemssupport this option. This option exists for support of the Linuxautofs-based automounter.
-r
Mount the file system read-only. A synonym is-o ro.
-w
Mount the file system read/write. This is the default. A synonym is-o rw.
-t vfstype
The argument following the-tis used to indicate the file system type. The file system types which arecurrently supported are listed inlinux/fs/filesystems.c:minix, ext, ext2, xiafs, hpfs,msdos, umsdos, vfat,proc, nfs, iso9660, smbfs, ncpfs,affs, ufs, romfs,sysv, xenix, coherent.Note that the last three are equivalent and thatxenixandcoherentwill be removed at some point in the future --- usesysvinstead. Since kernel version 2.1.21 the typesextandxiafsdo not exist anymore.

The typeiso9660is the default. If no-toption is given, or if theautotype is specified, the superblock is probed for the filesystem type(minix, ext, ext2, xiafs, iso9660, romfsare supported).If this probe fails and/proc/filesystemsexists, then all of the filesystems listed there will be tried,except for those that are labeled "nodev" (e.g.,procandnfs).

Note that theautotype may be useful for user-mounted floppies.Warning: the probing uses a heuristic (the presence of appropriate `magic'),and could recognize the wrong filesystem type.

More than one type may be specified in a comma separatedlist. The list of file system types can be prefixed withnoto specify the file system types on which no action should be taken.(This can be meaningful with the-aoption.)

For example, the command:

mount -a -t nomsdos,ext
mounts all file systems except those of typemsdosandext.
-o
Options are specified with a-oflag followed by a comma separated string of options.Some of these options are only useful when they appear in the/etc/fstabfile. The following options apply to any file system that is beingmounted:
async
All I/O to the file system should be done asynchronously.
atime
Update inode access time for each access. This is the default.
auto
Can be mounted with the-aoption.
defaults
Use default options:rw, suid, dev, exec, auto, nouser, and async.
dev
Interpret character or block special devices on the file system.
exec
Permit execution of binaries.
noatime
Do not update inode access times on this file system (e.g, for fasteraccess on the news spool to speed up news servers).
noauto
Can only be mounted explicitly (i.e., the-aoption will not cause the file system to be mounted).
nodev
Do not interpret character or block special devices on the filesystem.
noexec
Do not allow execution of any binaries on the mounted file system.This option might be useful for a server that has file systems containingbinaries for architectures other than its own.
nosuid
Do not allow set-user-identifier or set-group-identifier bits to takeeffect.
nouser
Forbid an ordinary (i.e., non-root) user to mount the file system.This is the default.
remount
Attempt to remount an already-mounted file system. This is commonlyused to change the mount flags for a file system, especially to make areadonly file system writeable.
ro
Mount the file system read-only.
rw
Mount the file system read-write.
suid
Allow set-user-identifier or set-group-identifier bits to takeeffect.
sync
All I/O to the file system should be done synchronously.
user
Allow an ordinary user to mount the file system. This option impliesthe optionsnoexec, nosuid, and nodev(unless overridden by subsequent options, as in the option lineuser,exec,dev,suid).

 

FILESYSTEM SPECIFIC MOUNT OPTIONS

The following options apply only to certain file systems.We sort them by file system. They all follow the-oflag.

 

Mount options for affs

uid=value and gid=value
Set the owner and group of the root of the file system (default: uid=gid=0,but with optionuidorgidwithout specified value, the uid and gid of the current process are taken).
setuid=value and setgid=value
Set the owner and group of all files.
mode=value
Set the mode of all files tovalue & 0777disregarding the original permissions.Add search permission to directories that have read permission.The value is given in octal.
protect
Do not allow any changes to the protection bits on the file system.
usemp
Set uid and gid of the root of the file system to the uid and gidof the mount point upon the first sync or umount, and thenclear this option. Strange...
verbose
Print an informational message for each successful mount.
prefix=string
Prefix used before volume name, when following a link.
volume=string
Prefix (of length at most 30) used before '/' when following a symbolic link.
reserved=value
(Default: 2.) Number of unused blocks at the start of the device.
root=value
Give explicitly the location of the root block.
bs=value
Give blocksize. Allowed values are 512, 1024, 2048, 4096.
grpquota / noquota / quota / usrquota
These options are accepted but ignored.

 

Mount options for coherent

None.

 

Mount options for ext

None.Note that the `ext' file system is obsolete. Don't use it.Since Linux version 2.1.21 extfs is no longer part of the kernel source.

 

Mount options for ext2

The `ext2' file system is the standard Linux file system.Due to a kernel bug, it may be mounted with random mount options(fixed in Linux 2.0.4).
bsddf / minixdf
Set the behaviour for thestatfssystem call. Theminixdfbehaviour is to return in thef_blocksfield the total number of blocks of the file system, while thebsddfbehaviour (which is the default) is to subtract the overhead blocksused by the ext2 file system and not available for file storage. Thus
% mount /k -o minixdf; df /k; umount /kFilesystem   1024-blocks  Used Available Capacity Mounted on/dev/sda6      2630655   86954  2412169      3%   /k% mount /k -o bsddf; df /k; umount /kFilesystem   1024-blocks  Used Available Capacity Mounted on/dev/sda6      2543714      13  2412169      0%   /k
(Note that this example shows that one can add command line optionsto the options given in/etc/fstab.)

check / check=normal / check=strict
Set checking level. When at least one of these options is set (andcheck=normalis set by default) the inodes and blocks bitmaps are checked upon mount(which can take half a minute or so on a big disk).With strict checking, block deallocation checks that the block to freeis in the data zone.
check=none / nocheck
No checking is done.
debug
Print debugging info upon each (re)mount.
errors=continue / errors=remount-ro / errors=panic
Define the behaviour when an error is encountered.(Either ignore errors and just mark the file system erroneous and continue,or remount the file system read-only, or panic and halt the system.)The default is set in the filesystem superblock, and can bechanged usingtune2fs(8).
grpid or bsdgroups / nogrpid or sysvgroups
These options define what group id a newly created file gets.Whengrpidis set, it takes the group id of the directory in which it is created;otherwise (the default) it takes the fsgid of the current process, unlessthe directory has the setgid bit set, in which case it takes the gidfrom the parent directory, and also gets the setgid bit setif it is a directory itself.
resgid=n and resuid=n
The ext2 file system reserves a certain percentage of the availablespace (by default 5%, seemke2fs(8)andtune2fs(8)).These options determine who can use the reserved blocks.(Roughly: whoever has the specified uid, or belongs to the specified group.)
sb=n
Instead of block 1, use blocknas superblock. This could be useful when the filesystem has been damaged.Usually, copies of the superblock are found every 8192 blocks: inblock 1, 8193, 16385, ...(Thus, one gets hundreds or even thousands of copies of the superblockon a big filesystem. I do not know of options to mke2fs that wouldcause fewer copies to be written.)
grpquota / noquota / quota / usrquota
These options are accepted but ignored.

 

Mount options for fat

(Note:fatis not a separate filesystem, but a common part of themsdos,umsdosandvfatfilesystems.)
blocksize=512 / blocksize=1024
Set blocksize (default 512).
uid=value and gid=value
Set the owner and group of all files. (Default: the uid and gidof the current process.)
umask=value
Set the umask (the bitmask of the permissions that arenotpresent). The default is the umask of the current process.The value is given in octal.
check=value
Three different levels of pickyness can be chosen:
r[elaxed]
Upper and lower case are accepted and equivalent, long name parts aretruncated (e.g.verylongname.foobarbecomesverylong.foo),leading and embedded spaces are accepted in each name part (name and extension).
n[ormal]
Like "relaxed", but many special characters (*, ?, <, spaces, etc.) arerejected. This is the default.
s[trict]
Like "normal", but names may not contain long parts and special charactersthat are sometimes used on Linux, but are not accepted by MS-DOS arerejected. (+, =, spaces, etc.)
conv=b[inary] / conv=t[ext] / conv=a[uto]
Thefatfile system can perform CRLF<-->NL (MS-DOS text format to UNIX textformat) conversion in the kernel. The following conversion modes areavailable:
binary
no translation is performed. This is the default.
text
CRLF<-->NL translation is performed on all files.
auto
CRLF<-->NL translation is performed on all files that don't have a"well-known binary" extension. The list of known extensions can be found atthe beginning offs/fat/misc.c(as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).

Programs that do computed lseeks won't like in-kernel text conversion.Several people have had their data ruined by this translation. Beware!

For file systems mounted in binary mode, a conversion tool(fromdos/todos) is available.

debug
Turn on thedebugflag. A version string and a list of file system parameters will beprinted (these data are also printed if the parameters appear to beinconsistent).
fat=12 / fat=16
Specify either a 12 bit fat or a 16 bit fat. This overridesthe automatic FAT type detection routine. Use with caution!
quiet
Turn on thequietflag. Attempts to chown or chmod files do not return errors,although they fail. Use with caution!
sys_immutable, showexec, dots, nodots, dotsOK=[yes|no]
Various misguided attempts to force Unix or DOS conventionsonto a FAT file system.

 

Mount options for hpfs

uid=value and gid=value
Set the owner and group of all files. (Default: the uid and gidof the current process.)
umask=value
Set the umask (the bitmask of the permissions that arenotpresent). The default is the umask of the current process.The value is given in octal.
case=lower / case=asis
Convert all files names to lower case, or leave them.(Default:case=lower.)
conv=binary / conv=text / conv=auto
Forconv=text,delete some random CRs (in particular, all followed by NL)when reading a file.Forconv=auto,choose more or less at random betweenconv=binary and conv=text.Forconv=binary,just read what is in the file. This is the default.
nocheck
Do not abort mounting when certain consistency checks fail.

 

Mount options for iso9660

Normaliso9660filenames appear in a 8.3 format (i.e., DOS-like restrictions on filenamelength), and in addition all characters are in upper case. Also there isno field for file ownership, protection, number of links, provision forblock/character devices, etc.

Rock Ridge is an extension to iso9660 that provides all of these unix likefeatures. Basically there are extensions to each directory record thatsupply all of the additional information, and when Rock Ridge is in use,the filesystem is indistinguishable from a normal UNIX file system (exceptthat it is read-only, of course).

norock
Disable the use of Rock Ridge extensions, even if available. Cf.map.
check=r[elaxed] / check=s[trict]
Withcheck=relaxed,a filename is first converted to lower case before doing the lookup.This is probably only meaningful together withnorockandmap=normal.(Default:check=strict.)
uid=value and gid=value
Give all files in the file system the indicated user or group id,possibly overriding the information found in the Rock Ridge extensions.(Default:uid=0,gid=0.)
map=n[ormal] / map=o[ff]
For non-Rock Ridge volumes, normal name translation maps upperto lower case ASCII, drops a trailing `;1', and converts `;' to `.'.Withmap=offno name translation is done. Seenorock.(Default:map=normal.)
mode=value
For non-Rock Ridge volumes, give all files the indicated mode.(Default: read permission for everybody.)Since Linux 2.1.37 one no longer needs to specify the mode indecimal. (Octal is indicated by a leading 0.)
unhide
Also show hidden and associated files.
block=[512|1024|2048]
Set the block size to the indicated value.(Default:block=1024.)
conv=a[uto] / conv=b[inary] / conv=m[text] / conv=t[ext]
(Default:conv=binary.)Since Linux 1.3.54 this option has no effect anymore.(And non-binary settings used to be very dangerous,often leading to silent data corruption.)
cruft
If the high byte of the file length contains other garbage,set this mount option to ignore the high order bits of the file length.This implies that a file cannot be larger than 16MB.The `cruft' option is set automatically if the entire CDROMhas a weird size (negative, or more than 800MB). It is alsoset when volume sequence numbers other than 0 or 1 are seen.

 

Mount options for minix

None.

 

Mount options for msdos

See mount options for fat.If themsdosfile system detects an inconsistency, it reports an error and sets the filesystem read-only. The file system can be made writeable again by remountingit.

 

Mount options for ncp

Just likenfs, the ncpimplementation expects a binary argument (astruct ncp_mount_data)to the mount system call. This argument is constructed byncpmount(8)and the current version ofmount(2.6h) does not know anything about ncp.

 

Mount options for nfs

Instead of a textual option string, parsed by the kernel, thenfsfile system expects a binary argument of typestruct nfs_mount_data.The programmountitself parses the following options of the form `tag=value',and puts them in the structure mentioned:rsize=n,wsize=n,timeo=n,retrans=n,acregmin=n,acregmax=n,acdirmin=n,acdirmax=n,actimeo=n,retry=n,port=n,mountport=n,mounthost=name,mountprog=n,mountvers=n,nfsprog=n,nfsvers=n,namlen=n.The optionaddr=nis accepted but ignored.Also the following Boolean options, possibly preceded bynoare recognized:bg,fg,soft,hard,intr,posix,cto,ac,tcp,udp,lock.For details, seenfs(5).

Especially useful options include

rsize=8192,wsize=8192
This will make your nfs connection much faster than with the defaultbuffer size of 1024.
hard
The program accessing a file on a NFS mounted file system will hangwhen the server crashes. The process cannot be interrupted orkilled unless you also specifyintr.When the NFS server is back online the program will continue undisturbedfrom where it was. This is probably what you want.
soft
This option allows the kernel to time out if the nfs server is notresponding for some time. The time can bespecified withtimeo=time.This option might be useful if your nfs server sometimes doesn't respondor will be rebooted while some process tries to get a file from the server.Usually it just causes lots of trouble.
nolock
Do not use locking. Do not start lockd.

 

Mount options for proc

uid=value and gid=value
These options are recognized, but have no effect as far as I can see.

 

Mount options for romfs

None.

 

Mount options for smbfs

Just likenfs, the smbimplementation expects a binary argument (astruct smb_mount_data)to the mount system call. This argument is constructed bysmbmount(8)and the current version ofmount(2.6c) does not know anything about smb.

 

Mount options for sysv

None.

 

Mount options for ufs

None.

 

Mount options for umsdos

See mount options for msdos.ThedotsOKoption is explicitly killed byumsdos.

 

Mount options for vfat

First of all, the mount options forfatare recognized.ThedotsOKoption is explicitly killed byvfat.Furthermore, there are
uni_xlate
Translate unhandled Unicode characters to special escaped sequences.This lets you backup and restore filenames that are created with anyUnicode characters. Without this option, a '?' is used when notranslation is possible. The escape character is ':' because it isotherwise illegal on the vfat filesystem. The escape sequencethat gets used, where u is the unicode character,is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
posix
Allow two files with names that only differ in case.
nonumtail
First try to make a short name without sequence number,before tryingname~num.ext.

 

Mount options for xenix

None.

 

Mount options for xiafs

None. Although nothing is wrong with xiafs, it is not used much,and is not maintained. Probably one shouldn't use it.Since Linux version 2.1.21 xiafs is no longer part of the kernel source.

 

THE LOOP DEVICE

One further possible type is a mount via the loop device. For example,the command

  mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024

will set up the loop device/dev/loop3to correspond to the file/tmp/fdimage,and then mount this device on/mnt.This type of mount knows about three options, namelyloop, offset and encryption,that are really options tolosetup(8).If no explicit loop device is mentioned(but just an option `-o loop' is given), thenmountwill try to find some unused loop device and use that.

 

FILES

/etc/fstabfile system table
/etc/mtabtable of mounted file systems
/etc/mtab~lock file
/etc/mtab.tmptemporary file 

SEE ALSO

mount(2),umount(2),fstab(5),umount(8),swapon(8),nfs(5),mountd(8),nfsd(8),mke2fs(8),tune2fs(8),losetup(8) 

BUGS

It is possible for a corrupted file system to cause a crash.

Some Linux file systems don't support-o sync(the ext2fsdoessupport synchronous updates (a la BSD) when mounted with thesyncoption).

The-o remountmay not be able to change mount parameters (allext2fs-specificparameters, exceptsb,are changeable with a remount, for example, but you can't changegidorumaskfor thefatfs). 

HISTORY

Amountcommand appeared in Version 6 AT&T UNIX.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILESYSTEM SPECIFIC MOUNT OPTIONS
Mount options for affs
Mount options for coherent
Mount options for ext
Mount options for ext2
Mount options for fat
Mount options for hpfs
Mount options for iso9660
Mount options for minix
Mount options for msdos
Mount options for ncp
Mount options for nfs
Mount options for proc
Mount options for romfs
Mount options for smbfs
Mount options for sysv
Mount options for ufs
Mount options for umsdos
Mount options for vfat
Mount options for xenix
Mount options for xiafs
THE LOOP DEVICE
FILES
SEE ALSO
BUGS
HISTORY

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector