Linux System Management-(2)--disk mount and unload

Source: Internet
Author: User
Tags readable uuid

What is mounted:

The additional file system is associated with an existing directory of the root file system, so that the directory as the other file access entry behavior is called mount;

What is uninstall:

The process of releasing this association is called unloading;

Note: The existing files under the mount point will be temporarily hidden after the mount is completed;

Mount Method: Mount DEVICE mount_point
Mount: Displays all devices that are currently mounted on the system by viewing the/etc/mtab file
Mount [-FNRSVW] [-t vfstype] [-O options] Device dir
Device: Indicate the equipment to be mounted;
(1) device files: e.g./dev/sda5
(2) Label:-L ' LABEL ', e.g.-l ' MYDATA '
(3) UUID,-u ' uuid ': for example-U ' 0c50523c-43f1-45e7-85c0-a126711d406e '
(4) Pseudo file system name: Proc, SYSFS, Devtmpfs, Configfs
Dir: Mount point
Pre-existing; Recommended use of empty directories;
The device that the process is in use cannot be uninstalled;

Common Command options:
-T Vsftype: Specifies the type of file system on the device you want to mount;
-r:readonly, read-only mount;
-w:read and write, read-write Mount;
-N: Do not update/etc/mtab;
-A: Automatically mounts all devices that support automatic mounts, (defined in the/etc/fstab file, and the Mount option has "Auto mount" function)
-L ' LABEL ': Specifies the mounting device by volume label;
-U ' UUID ': Specifies the device to be mounted with the UUID;
-B,--bind: Bind directory to another directory;

Note: View all mounted devices tracked by the kernel: cat/proc/mounts

-O options: (option to mount file system)
Async: Asynchronous mode;
Sync: synchronous mode;
Atime/noatime: Contains directories and files;
Diratime/nodiratime: Access timestamp for directory
Auto/noauto: Whether auto mount is supported
Exec/noexec: Whether to support running applications on the file system as a process
Dev/nodev: Whether to support the use of device files on this file system;
Suid/nosuid:
Remount: Re-mount
Ro:
rw
User/nouser: Whether to allow normal users to mount this device
ACL: Enable the ACL feature on this file system

Note: The above options can be used in multiple simultaneous use, separated from each other by commas;
Default mount options: Defaults

RW, suid, dev, exec, auto, Nouser, and Async

Uninstall command:
# Umount DEVICE #通过目录卸载
# Umount Mount_point #通过挂载点卸载

to view the process that is accessing the specified file system:
# fuser-v Mount_point

Terminates all processes that are accessing the specified file system:
# fuser-km Mount_point

mount Swap partition:
Enabled: Swapon
Swapon [OPTION] ... [DEVICE]
-A: Activates all swap partitions;
-P Priority: Specify the precedence;
Disabled: Swapoff [OPTION] ... [DEVICE]

Memory space usage Status:
free [OPTION]
-M: in megabytes
-G: in gigabytes

viewing tools For information such as file system space usage:
Df:
-h:human-readable
-i:inodes instead of blocks
-P: Output in POSIX compatible format;

To view the overall space consumption status of a directory:
Du
Du [OPTION] ... DIR
-h:human-readable

-s:summary

File Mount Profile:/etc/fstab

650 "this.width=650;" src= "http:// img.blog.csdn.net/20150829160748111 "/>
defines a file system to mount for each row;

Device or pseudo file system      mount point to Mount      File system types       mount options      Dump frequency       self-Test order

Device or pseudo-file system to mount:

Device file, LABEL (label= "), UUID (uuid=" "), pseudo file system name (proc, SYSFS)

Mount Options:
Defaults

Dump frequency:
0: Do not make a backup
1: Daily dumps
2: Dump every other day

Self-Test order:
0: No self-test
1-9: Priority self-test; usually only rootfs is used 1;


Linux System Management-(2)--disk mount and unload

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.