Linux System Management-Disk Management 2

Source: Internet
Author: User
Tags parent directory uuid

1. File System Management

1> Partition identification

Set Volume Label: e2lable [device Name] ["Volume label name"]

View Volume Label: e2lable [device name]

Delete Volume Label: e2lable [device name] ""

2> Viewing block device properties

Blkid [device name]:blkid/dev/sda1------>/dev/sda1:uuid= "F6042BCD-A495-4496-9098-6C24EB9842FD" type= "Ext4"

UUID is generated when the disk is assigned to a file system to see if the partition is formatted

3> Viewing partition properties

tune2fs-l [device name]

"Block size 4096"---> represents block sizes 4Kb

2. Mount mounted File system

Format: Mount [options] [device name] [Mount Point]

-A: Load all fstab To configure the file system

-T: Specify File system type

ISO9660---> Disc or image file

-O: Specify mount Parameters

RO/RW: Read-only/readable/writable

Acl/noacl: Toggle ACL on/off

Exec/noexec: Enable/Disable binary file permissions in disk

Suid/nosudi: Enable/disable SUID and Sgid

Remount: Re-mount for adding new parameters, multiple parameters separated by ","

-L Mount by volume label

-U mount with UUID

-O loop Mount disc image file

--bind Directory mount to Directory

Default option Defaults:rw,suid,dev,exec,auto,nouser,async

Mkiosfs-o [iOS filename] [iOS path] Create iOS file system

3, display the use of the disk DF

-H: Easy-to-read view of partition size

-T: Show file types

[Email protected] tmp]# df-ht/dev/sda1
Filesystem Type Size used Avail use% mounted on
/DEV/SDA1 ext4 283M 70M 198M 27%/boot
5. Uninstall the device that is already mounted

Umount [device name] or [Mount Point]

FUSER-VM [Mount point] View mount point who is using

fuser-km [Mount Point] terminating the use of Mount points

6. Automatic mount on Boot

/etc/fstab is a file used to hold static information about the file system. When the system starts, the system automatically reads the information from this file and automatically mounts the file system specified in the file to the specified directory.

Configuration file:/etc/fatab

Format: [Device File | Volume label name | UUID] [Mount point] [type] [Mount parameter] [backup tag] [detection order]

Uuid=f6042bcd-a495-4496-9098-6c24eb9842fd/boot EXT4 Defaults 1 2 normal disk partition mount
uuid=0766f153-361d-4af8-97d4-f801ca7e8048 swap swap defaults 0 0 swap partition mount
Swap boot load needs to be restarted, Swapon-a detect fstab writing is correct

7, departure mount, AutoFS, need to install the relevant software

Master profile:/etc/auto.master for defining the monitoring directory

[Mount point Parent directory] [Configuration file for mount Point]

/misc/etc/auto.misc
Monitoring directory:/etc/auto.misc

[Mount the PIP directory] [-fstype= mount parameter: device name]

Cd-fstype=iso9660,ro,nosuid,nodev:/dev/sr0 Trigger mount image file, Mount/dev/sr0 device to/misc/cd/directory

Service AutoFS stop Stop AutoFS Services

Service AutoFS start to open AutoFS services

  

   

  

  

Linux System Management-Disk Management 2

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.