mount

Table of Content

Commands

CommandDescription
umount -f -l /pathforces 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-seperated

Means 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 OptionDescription
asyncAllows the system to perform I/O asynchronously on the mounted FS
atimeEnables the update of inode access time on the FS
noatimeDisables the update of inode access time on the FS which helps in performance
autoAllows to be mounted with mount -a
noautoDisables auto mount (mount -a) and requieres explicitly to be mounted
bindSame as --bind
rbindSame as --rbind
defaultsEnables the following mout options: rw, suid, dev, exec, auto, nouser and async
devAllows the system to treat block/device files as such in the filesystem
nodevForbitts the system to treat block/device files as such in the filesystem
execPermits the system to run any kind of executeables stored on the mounted FS
noexecForbitts the system to run any kind of executeables stored on the mounted FS
groupAllows 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
nofailErrors will not be shown if the device is not available (comes handy during the boot process in some cases)
realtimeClose 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
suidAllows the execution through set-uid-ID bit
nosuidAllows the execution through set-uid-ID bit
ownerAllows local user to mount the device. Implies nosuid and nodev unless overwritten in later options
remountPerforms a remount of an already mounted device
roMounts the FS in read-only mode
rwMounts the FS in read-write mode
userAllows local user to mount the FS. Implies noexec, nosuid and nodev unless overwritten in later options
nouserDisallows mount for normal users