Mount and unmount the disk of

Mount concept brief

Other files outside the root file system in order to be able to be accessed, must be "linked" to a directory on the root file system implemented by this association operation is the "mount", this directory is "mount point "To cancel the association process called" uninstall "

1. Mount: the outer root file system to enable access by association to a directory on the root file system;

2. mount point: mount_point, as another inlet for accessing the file system:

  • Pre-existing;
  • It should be used or not will not be used to process other directories;
  • Mount point under the original file will be hidden; 

Also note:

To mount the front, you'd better determine a few things:

  • A single file system mounted should not be repeated at different points of the mount (directory);
  • Single directory should not be repeated mount multiple file systems;
  • To mount point as a directory, in theory, should all be empty directory it is.

Mount: mount

grammar:

mount [-fnrsvw] [-t vfstype] [-o options] device mount point

device:

  • Device files: for example, / dev / sda5
  • Label: -L 'LABEL', e.g. -L 'MYDATA'
  • UUID, -U 'UUID': e.g. -U '0c50523c-43f1-45e7-85c0-a126711d406e'
  • Pseudo file system name: proc, sysfs, devtmpfs, configfs

Mount point:

  • Pre-existing; recommended to use an empty directory;
  • Process equipment is in use and can not be uninstalled;

Options:

    -t vsftype: specify the type of file system on the device to be mounted;

    -r: readonly, read-only mount;

    -w: read and write, read mount;

     -n: In case of default, the system will actually mounts the real-time write / etc / mtab in order to facilitate the operation of other programs. However, in some cases (such as single maintenance mode) To avoid problems, will deliberately not written; this time you have to use the -n option of;

    -a: automatically mount automatically mount all supported devices; (defined in the / etc / fstab file and mount options in the "auto-mount" function)

    -L 'LABEL': volume label specified mount device;

    -U 'UUID': a UUID specified device will be mounted;

    -B, --bind: binding directory to another directory;

  -o options :( option to mount the file system)

  • async: asynchronous mode;
  • sync: synchronization pattern;
  • atime / noatime: contains directories and files;
  • Visit timestamp directory: diratime / nodiratime
  • auto / noauto: whether to support automatically mount
  • exec / noexec: whether to support the applications that run on the file system to process
  • dev / nodev: whether to support the use of device files on the file system;
  • suid / nosuid: whether to support the use of special rights on this file system
  • remount: remount
  • ro: Tada读
  • rw: read-write
  • user / nouser: whether to allow ordinary users to mount the device
  • acl: acl enable features on this file system 

note:

A plurality of the above options can be used simultaneously, separated by commas with one another;

Default mount options: defaults: rw, suid, dev, exec, auto, nouser, and async

Viewing the kernel to track all the mounted devices: cat / proc / mounts 

Mount Ext2 / Ext3 file system:

Dismount: umount

grammar:

umount [-fn] means the file name or mount point.

Options:

-f: Force dismount! Available in the case of a similar network file system (NFS) can not be read to.

-n: Do not upgrade the under / etc / mtab case removed.

 

 
 

Other files outside the root file system in order to be able to be accessed, must be "linked" to a directory on the root file system implemented by this association operation is the "mount", this directory is "mount point "To cancel the association process called" uninstall "

1. Mount: the outer root file system to enable access by association to a directory on the root file system;

2. mount point: mount_point, as another inlet for accessing the file system:

  • Pre-existing;
  • It should be used or not will not be used to process other directories;
  • Mount point under the original file will be hidden; 

Also note:

To mount the front, you'd better determine a few things:

  • A single file system mounted should not be repeated at different points of the mount (directory);
  • Single directory should not be repeated mount multiple file systems;
  • To mount point as a directory, in theory, should all be empty directory it is.

Mount: mount

grammar:

mount [-fnrsvw] [-t vfstype] [-o options] device mount point

device:

  • Device files: for example, / dev / sda5
  • Label: -L 'LABEL', e.g. -L 'MYDATA'
  • UUID, -U 'UUID': e.g. -U '0c50523c-43f1-45e7-85c0-a126711d406e'
  • Pseudo file system name: proc, sysfs, devtmpfs, configfs

Mount point:

  • Pre-existing; recommended to use an empty directory;
  • Process equipment is in use and can not be uninstalled;

Options:

    -t vsftype: specify the type of file system on the device to be mounted;

    -r: readonly, read-only mount;

    -w: read and write, read mount;

     -n: In case of default, the system will actually mounts the real-time write / etc / mtab in order to facilitate the operation of other programs. However, in some cases (such as single maintenance mode) To avoid problems, will deliberately not written; this time you have to use the -n option of;

    -a: automatically mount automatically mount all supported devices; (defined in the / etc / fstab file and mount options in the "auto-mount" function)

    -L 'LABEL': volume label specified mount device;

    -U 'UUID': a UUID specified device will be mounted;

    -B, --bind: binding directory to another directory;

  -o options :( option to mount the file system)

  • async: asynchronous mode;
  • sync: synchronization pattern;
  • atime / noatime: contains directories and files;
  • Visit timestamp directory: diratime / nodiratime
  • auto / noauto: whether to support automatically mount
  • exec / noexec: whether to support the applications that run on the file system to process
  • dev / nodev: whether to support the use of device files on the file system;
  • suid / nosuid: whether to support the use of special rights on this file system
  • remount: remount
  • ro: Tada读
  • rw: read-write
  • user / nouser: whether to allow ordinary users to mount the device
  • acl: acl enable features on this file system 

note:

A plurality of the above options can be used simultaneously, separated by commas with one another;

Default mount options: defaults: rw, suid, dev, exec, auto, nouser, and async

Viewing the kernel to track all the mounted devices: cat / proc / mounts 

Mount Ext2 / Ext3 file system:

Dismount: umount

grammar:

umount [-fn] means the file name or mount point.

Options:

-f: Force dismount! Available in the case of a similar network file system (NFS) can not be read to.

-n: Do not upgrade the under / etc / mtab case removed.

 

Guess you like

Origin www.cnblogs.com/yangyongchao/p/12441560.html