mount
Table of Content
Commands
Command | Description |
---|---|
umount -f -l /path | forces umount but in lacy mode, which means that it fully gets unmounted when all operations running on the FS stoped |
`mount –move </path/to/mount> </new/path/to/mount> | Changes the path where the mount is mounted |
mount --bind </path/to/source> </path/to/mount> | Allows you to mount dirs/files to other places e.g. mount --bind /etc/conf1 /new_etc/conf1 |
mount --rbind </path/to/dir> </path/to/mount> | Allows a recursive bind mount to ensure that submounts of the source are accesable as well |
Mount Options
requires the parameter
-o
first and are comma-seperatedMeans could look like this:
mount -o rw,uid=1000 /dev/root-vg/user-lv /home/user
If there are conflicts between two or more options, the ordering matters. The last option will win
Mount Option | Description |
---|---|
async | Allows the system to perform I/O asynchronously on the mounted FS |
atime | Enables the update of inode access time on the FS |
noatime | Disables the update of inode access time on the FS which helps in performance |
auto | Allows to be mounted with mount -a |
noauto | Disables auto mount (mount -a ) and requieres explicitly to be mounted |
bind | Same as --bind |
rbind | Same as --rbind |
defaults | Enables the following mout options: rw , suid , dev , exec , auto , nouser and async |
dev | Allows the system to treat block/device files as such in the filesystem |
nodev | Forbitts the system to treat block/device files as such in the filesystem |
exec | Permits the system to run any kind of executeables stored on the mounted FS |
noexec | Forbitts the system to run any kind of executeables stored on the mounted FS |
group | Allows local user (if part of group) to mount the device. Implies nosuid and nodev unless overwritten in later options |
_netdev | (_ is not a typo) Ensures that the mount requires network and prevents the system from trying to mount it until network is enabled |
nofail | Errors will not be shown if the device is not available (comes handy during the boot process in some cases) |
realtime | Close to noatime, but access time is only updated if modify/change time gets/got update, required for some application which need to know the last access time |
suid | Allows the execution through set-uid-ID bit |
nosuid | Allows the execution through set-uid-ID bit |
owner | Allows local user to mount the device. Implies nosuid and nodev unless overwritten in later options |
remount | Performs a remount of an already mounted device |
ro | Mounts the FS in read-only mode |
rw | Mounts the FS in read-write mode |
user | Allows local user to mount the FS. Implies noexec , nosuid and nodev unless overwritten in later options |
nouser | Disallows mount for normal users |