In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Mounting concept
Mounting is a very important feature, which is used very frequently. It refers to attaching a device (usually a storage device) to an existing directory. This directory may not be empty, but the previous content in this directory will not be available after mounting. It is important to understand that the linux operating system treats all devices as files, which integrates the resources of the entire computer into one large file directory. To access a file in a storage device, we must mount the partition where the file resides to an existing directory, and then access the storage device by accessing that directory.
Note:
The directory of the mount point requires the following requirements:
(1) the directory exists in advance. You can use the mkdir command to create a new directory.
(2) the mount point directory cannot be used by other processes
(3) the original file will be hidden under the mount point.
Mounting and unloading
Mounting method:
Mount DECE MOUNT_POINT
Mount: show all the devices that have been mounted on the current system by viewing the / etc/mtab (there will be an explanation of / etc/mtab at the end of the article)
The command uses the format:
Mount [- fnrsvw] [- t vfstype] [- o options] device dir
Device: indicates the device to be mounted
(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'
(4) pseudo file system name: proc, sysfs, devtmpfs, configfs
Dir: Mount point
Pre-existing; an empty directory is recommended
Devices in use by the process cannot be uninstalled
Common command 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-write mount;-n: do not update / etc/mtab;-a: automatically mount all devices that support automatic mount; (defined in / etc/fstab file, and mount options have "auto mount" function)-L 'LABEL': specifies mounting devices with volume label -U 'UUID': specifies the device to be mounted with UUID;-B,-- bind: bind the directory to another directory
Note: check all mounted devices traced to the kernel: cat / proc/mounts
Expand knowledge:
-o options: (option to mount the file system) async: asynchronous mode; sync: synchronous mode; atime/noatime: contains directories and files; diratime/nodiratime: directory access timestamp auto/noauto: whether automatic mount is supported exec/noexec: whether to run applications on the file system as processes dev/nodev: whether to support the use of device files on this file system Suid/nosuid: whether to support the use of special permissions on this file system remount: remount ro: read-only rw: read-write user/nouser: whether ordinary users are allowed to mount this device acl: enable the acl feature on this file system
Note: the above options can be used at the same time, separated by commas from each other.
Default mount options: defaults:rw, suid, dev, exec, auto,nouser,and async
These are the details of what is mounted in linux, please pay attention to other related articles!
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.