mount(1M)


mount, umount -- mount or unmount filesystems and remote resources (generic)

Synopsis

mount [-v | -p]
mount [-F FSType] [-V] [current_options] [-o specific_options]
[special | mount_point]
mount [-F FSType] [-V] [current_options] [-o specific_options]
special mount_point

umount [-V] [-o specific_options] [special | mount_point]

Description

Filesystems other than root (/) are considered removable in the sense that they can be either available to users or unavailable. mount notifies the system that special, a block special device or a remote resource, is available to users from the mount_point which must already exist; it becomes the name of the root of the newly mounted special or resource.

mount, when entered with arguments, validates all arguments except the device name and invokes an FSType specific mount module. If invoked with no arguments, mount lists all the mounted filesystems from the mount table. If invoked with any of the following partial argument lists (for example, one of special or mount_point or when both arguments are specified but no FSType is specified), mount searches /etc/vfstab to fill in the missing arguments: FSType, special, mount_point, specific_options. It then invokes the FSType-specific mount module.

Most FSTypes do not have a umount specific module. If one exists, it is executed; otherwise, the generic module unmounts the filesystem. If the -o option is specified, the umount specific module is always executed.

current_options are options supported by the s5-specific module of mount and umount. Other FSTypes do not necessarily support these options. specific_options indicate suboptions specified in a comma-separated list of suboptions and/or keyword-attribute pairs for interpretation by the FSType-specific module of the command.

The options are:


-v
Print the output in a new style. The new output has the FSType and flags displayed in addition to the old output. The mount_point and special fields are reversed.

-p
Print the list of mounted filesystems in the /etc/vfstab format.

-F
Specify the FSType on which to operate. If -F FSType is not specified it is determined either from /etc/vfstab or from heuristics similiar to those used by fstyp(1M).


NOTE: If the FSType is known beforehand, use the -F option. This command executes faster if it is not required to autodetect file system types.


-V
Echo the complete command line, but do not execute the command. The command line is generated by using the options and arguments provided by the user and adding to them information derived from /etc/vfstab. This option should be used to verify and validate the command line.

-o
Specify FSType-specific options.
mount can be used by any user to list mounted filesystems and resources. Only a privileged user can mount or unmount filesystems.

Files


/etc/mnttab
mount table

/etc/vfstab
list of default parameters for each filesystem

Exit codes

The following values are returned by the generic mount command:

0
Successful exit

1
Usage error

2
Invalid combinations of options

4
Invalid arguments for options

5
FSType exceeds MAX characters

6
More than one FSType specified

7
Cannot open vfstab

8
getvfsany error

9
Cannot open mnttab

10
Cannot lock mnttab

11
getmntent error

12
Cannot stat mount point

13
Mount point cannot be determined

14
Mount point is not an absolute pathname

15
Mount point does not exist

18
special device cannot be determined

19
Device not found in device database

21
Cannot access device database

27
malloc error - unable to allocate memory

28
wait error - unexpected problem with filesystem dependent mount

29
fork error - Unable to create a process

30
exec error - Invalid filesystem type

31
exec error - Permission denied
The following values are returned by the generic umount command:

0
Success

1
Usage error

2
FSType name exceeds maximum characters

3
Cannot execute path

4
Cannot open mnttab

5
Cannot lock mnttab

6
Line in mnttab exceeds max chars

7
Line in mnttab has too few entries

8
Miscellaneous errors from getmntent

9
Cannot open temp file

10
Cannot write to temp file

11
umount - permission denied

12
umount - no such device

13
umount - no such directory

14
umount - not mounted

15
umount - mount pt busy

16
umount - block device required

17
umount - broken link detected

18
umount - misc error

References

fstyp(1M), mnttab(4), mount(1Mnfs), mount_bfs(1M), mount_cdfs(1M), mount_dosfs(1M), mount_memfs(1M), mount_profs(1M), mount_s5(1M), mount_sfs(1M), mount_ufs(1M), mount_vxfs(1M), setmnt(1M), vfstab(4)

Notices

mount does not prevent you from mounting a filesystem on a directory that is not empty.

The old output format will be phased out in a future release and all output will be in the new -v format. The most significant changes are the addition of two new fields to show the FSType and flags, and the reversal of the mount_point and special name.

mount adds an entry to the mount table /etc/mnttab; umount removes an entry from the table.

mount now resolves the mount_point argument using realpath(3C) before any processing is performed.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004