In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge of what the concept of mount is in linux. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
In linux, mount means "mount" and is used to associate the device file system with the linux file system by specifying a directory; the syntax includes "mount [- t system type] [- L volume label] [- o special option] [- n] device file name mount point", "mount-a" and so on.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
In the Linux system, everything is a file, and all files are placed in a tree structure with the root directory as the root of the tree. In Linux's view, any hardware device is also a file, each with its own set of file systems (file directory structure).
Therefore, the problem is that when using these hardware devices in the Linux system, the hardware devices can only be used by combining the file directory of the Linux itself with the file directory of the hardware device. The process of merging two into one is called "mounting".
Mount refers to connecting the top-level directory in the device file to a directory under the Linux root directory (preferably an empty directory). Accessing this directory is equivalent to accessing the device file.
Mount refers to the association between the file system of the hardware device and the file system in the Linux system by specifying a directory (as the mount point). To mount a file system to a Linux system, you need to use the mount mount command.
The common formats of the mount command are as follows:
Mount [- l]
Simply using the mount command will display the information of the mounted devices in the system, and using the-l option, the additional volume label name will be displayed (readers can run it themselves and view the output results)
Mount-a
The-an option means to automatically check the / etc/fstab file for negligent mounted device files, and if so, perform an automatic mount operation. Here is a brief introduction to the / etc/fstab file, which is automatically mounted. The system will actively read the contents of the / etc/fstab file when the system boots. According to the configuration of the file, the system will automatically mount the specified device. Details on auto-mount (modifying this file) will be explained in subsequent articles.
Mount [- t system type] [- L volume label name] [- o special option] [- n] device file name mount point
The meaning of each option is:
-t system type: specifies the file system type to be mounted. The common support types of Linux are EXT2, EXT3, EXT4, iso9660 (CD format), vfat, reiserfs and so on. If you do not specify a specific type, Linux will automatically detect it when mounting.
-L volume label name: in addition to using the device file name (for example, / dev/hdc6), you can mount it using the volume label name of the file system.
-n: by default, the system writes the actual mount to the / etc/mtab file in real time, but in some scenarios (such as single-person maintenance mode), it is deliberately not written in order to avoid problems, so you need to use this option
-o Special options: additional options for mounting can be specified, such as read / write permissions, synchronous / asynchronous, etc., if not specified, the default value (defaults) is used. For specific special options, see Table 1.
Table 1 mount command options and feature options whether rw/ro has read and write permission to the mounted file system. Rw is the default value, which means read and write permission; ro means read-only permission. Async/sync whether this file system uses synchronous write (sync) or asynchronous (async) memory mechanism, defaults to asynchronous async. Whether dev/nodev allows data to be extracted from the block file of the file system. To ensure that the data is installed, the default is nodev. Whether auto/noauto allows this file system to be automatically mounted as mount-a. Default is auto. Suid/nosuid sets whether the file system has SetUID and SetGID permissions, which is owned by default. Exec/noexec sets whether executable files are allowed in the file system, which is allowed by default. User/nouser sets whether this file system allows ordinary users to perform mounts using mount. By default, it is not allowed (nouser), and only root can. Defaults defines default values, which are equivalent to the seven options of rw, suid, dev, exec, auto, nouser and async. Remount remounts a mounted file system, which is generally used to specify special permissions for modification.
[example 1]
[root@localhost ~] # mount# to view the mounted file systems in the system, and note that there is a virtual file system / dev/sda3 on / type ext4 (rw)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.