mount, umount - mount or unmount file systems and remote resources
mount [-p | -v]
mount [-F FSType] [generic_options] [-o specific_options] [-O] special | mount_point
mount [-F FSType] [generic_options] [-o specific_options] [-O] special mount_point
mount -a [-F FSType] [-V] [current_options] [-o specific_options] [mount_point]...
umount [-f] [-V] [-o specific_options] special | mount_point
umount -a [-f] [-V] [-o specific_options] [mount_point]...
mount attaches a file system to the file system hierarchy at the mount_point, which is the pathname of a directory. If mount_point has any contents prior to the mount operation, these are hidden until the file system is unmounted.
umount unmounts a currently mounted file system, which may be specified either as a mount_point or as special, the device on which the file system resides.
The table of currently mounted file systems can be found by examining the mounted file system information file. This is provided by a file system that is usually mounted on /etc/mnttab. The mounted file system information is described in mnttab(4). Mounting a file system adds an entry to the mount table; a umount removes an entry from the table.
When invoked with both the special and mount_point arguments and the -F option, mount validates all arguments except for special and invokes the appropriate FSType-specific mount module. If invoked with no arguments, mount lists all the mounted file systems recorded in the mount table, /etc/mnttab. If invoked with a partial argument list (with only one of special or mount_point, or with both special or mount_point specified but not FSType), mount will search /etc/vfstab for an entry that will supply the missing arguments. If no entry is found, and the special argument starts with /, the default local file system type specified in /etc/default/fs will be used. Otherwise the default remote file system type will be used. The default remote file system type is determined by the first entry in the /etc/dfs/fstypes file. After filling in missing arguments, mount will invoke the FSType-specific mount module.
For file system types that support it, a file can be mounted directly as a file system by specifying the full path to the file as the special argument. In such a case, the nosuid option is enforced. If specific file system support for such loopback file mounts is not present, you can still use lofiadm(1M) to mount a file system image. In this case, no special options are enforced.
Only a user with sufficient privilege (at least PRIV_SYS_MOUNT) can mount or unmount file systems using mount and umount. However, any user can use mount to list mounted file systems and resources.
-F FSType
-a [ mount_points. . . ]
If mount points are not specified, mount will mount all file systems whose /etc/vfstab "mount at boot" field is yes. If mount points are specified, then /etc/vfstab "mount at boot" field will be ignored.
If mount points are specified, umount will only umount those mount points. If none is specified, then umount will attempt to unmount all file systems in /etc/mnttab, with the exception of certain system required file systems: /, /usr, /var, /var/adm, /var/run, /proc, /dev/fd and /tmp.
-f
Without this option, umount does not allow a file system to be unmounted if a file on the file system is busy. Using this option can cause data loss for open files; programs which access files after the file system has been unmounted will get an error (EIO).
-p
-v
-V
generic_options
-m
-g
-o
The following options are supported:
devices | nodevices
If you use nosuid in conjunction with devices, the behavior is equivalent to that of nosuid.
exec | noexec
loop
nbmand | nonbmand
If the file system is mounted with the nbmand option, then applications can use the fcntl(2) interface to place non-blocking mandatory locks on files and the system enforces those semantics. If you enable this option, it can cause standards conformant applications to see unexpected errors.
To avoid the possibility of obtaining mandatory locks on system files, do not use the nbmand option with the following file systems:
/ /usr /etc /var /proc /dev /devices /system/contract /system/object /etc/mnttab /etc/dfs/sharetab
Do not use the remount option to change the nbmand disposition of the file system. The nbmand option is mutually exclusive of the global option. See -g.
ro | rw
setuid | nosetuid
If you specify setuid in conjunction with nosuid, the behavior is the same as nosuid.
nosuid is equivalent to nosetuid and nodevices. When suid or nosuid is combined with setuid or nosetuid and devices or nodevices, the most restrictive options take effect.
This option is highly recommended whenever the file system is shared by way of NFS with the root= option. Without it, NFS clients could add setuid programs to the server or create devices that could open security holes.
suid | nosuid
nosuid is equivalent to nosetuid and nodevices. When suid or nosuid is combined with setuid or nosetuid and devices or nodevices, the most restrictive options take effect.
This option is highly recommended whenever the file system is shared using NFS with the root=option, because, without it, NFS clients could add setuid programs to the server, or create devices that could open security holes.
-O
-r
Example 1 Mounting and Unmounting a DVD Image Directly
The following commands mount and unmount a DVD image.
# mount -F hsfs /images/solaris.iso /mnt/solaris-image # umount /mnt/solaris-image
See largefile(5) for the description of the behavior of mount and umount when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
/etc/mnttab
/etc/default/fs
LOCAL:
/etc/vfstab
See attributes(5) for descriptions of the following attributes:
|
lofiadm(1M), mount_cachefs(1M), mount_hsfs(1M), mount_nfs(1M), mount_pcfs(1M), mount_tmpfs(1M), mount_udfs(1M), mount_ufs(1M), mountall(1M), umountall(1M), fcntl(2), mmap(2), mnttab(4), vfstab(4), attributes( 5), largefile(5), privileges(5), lofs(7FS), pcfs(7FS)
If the directory on which a file system is to be mounted is a symbolic link, the file system is mounted on the directory to which the symbolic link refers, rather than on top of the symbolic link itself.
The mount -p output is incorrect for cachefs.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |