Get the App
SLTechnology News&Howtos  ›  Servers  › 

Study notes-"mounting details of Linux fundamentals (mount,umo)"

Shulou Source: shulou.com Published: 2022-06-02 17:31:41 09月21日 Update

"detailed mount explanation of Linux basic knowledge (mount,umount and boot auto mount)" Source: Linux community author: chawan

Original text link http://www.linuxidc.com/Linux/2016-08/134666.htm

The following are some abstracts and learning experiences made by the author of this article.

Important concepts (quoted in the original classic text)

Brief description of the concept of mounting:

For files other than the root file system to be accessible, they must be "associated" to a directory on the root file system. This association operation is called "mount", and this directory is the "mount point". The process of disassociating this association is called "unmounting".

1. Mount: access is achieved outside the root file system by associating to a directory on the root file system

two。 Mount point: mount_point, which is used as an access entry to another file system

(1) exist beforehand

(2) directories that are not or will not be used by other processes should be used.

(3) the original files under the mount point will be hidden.

[PS: the term attach to is used in the description document, and there is a biological-like neural connection. The root file system is like a nerve center. If you want to move your hands and feet, you have to connect to the nerve center. ]

two。 Query

1) system mount equipment roster: / etc/mtab (I like to open it with vim) [brief Note: mount table]

2) configuration file for file mount: / etc/fstab [abbreviation: file system table]

The difference between the two is that fstab submits the configuration file when the file system starts, and mtab is the running file mount table. The former is static, while the latter is dynamically updated.

3.mount

The command uses the format: mount [- fnrsvw] [- t vfstype] [- o options] device dir

Device (mount object) can be:

(1) device file: for example, / dev/sda5

(2) Volume label:-L 'LABEL', for example-L' MYDATA'

(3) UUID,-U 'UUID': such as-U' 0c50523c-43f1-45e7-85c0Meia126711d406e'

[UUID is a string that identifies the storage devices in your system and is designed to help users uniquely identify all storage devices in the system, regardless of their type. It can identify DVD drives, USB storage devices, and hard disk devices in your system. ]

(4) pseudo file system name: proc, sysfs, devtmpfs, configfs

The dir (mount point) should be:

(1) exist beforehand

(2) it is recommended to use an empty directory

(3) the device in use by the process cannot be uninstalled.

4. Uninstall command: umount

The command uses the format:

Umount DEVICE

Umount MOUNT_POINT

4. The commands involved

1) blkid: get file system type, UUID, label

[brief Note: block id]

2) df: disk usage

[brief Note: disk free]

Tags: Files systems devices associations commands directories shorthand storage devices nerves storage learning nerve centers hubs authors originals identifiers formats concepts types processes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information Linux Docker Microsoft