Linux HDD Management

Source: Internet
Author: User
Tags uuid

Manage your hard drive.
/dev/xxyn
SD SCSI SATA USB
HD IDE
Primary partition
Extended Partition 1-4
After logical partition 5
Fdisk-l hard disk name/partition name
Fdisk-l/DEV/SDA

How to partition a hard disk?
Divide the 500G hdd into 100G ext4 64G ext4
64G VFAT 120G Ext4

Fdisk-l/dev/sdb (hard disk to partition)

Fdisk/dev/sdb
n Create a partition
+100g

To format a partition:
Mkfs-t EXT4/DEV/SDB1
Mkswap

Mount
MOUNT-T partition type partition name mount point
Mount-t Ext4/dev/sdb1/project/fileone
Mount
Mount-o Mount post behavior partition name mount point
Ex
Mount-t Ext4-o Ro/dev/sdb5/project1/fileone
-O ro (indicates read only)
-O rw (readable and writable)

Unloading
Umount Partition Name
Umount mount point

Note: Try to mount the partition to an empty directory, and do not mount the partition frequently to
On different directories


How to boot automatically mount?
Modify/etc/fstab
For example add:
/dev/sdb1/project/finished EXT4 Defaults 0 0

What happens when there is a name coincidence when multiple hard disks are hot-swappable?
Processing method: Adding tags
Modify Label UUID
E2label partition device name label signature
E2LABEL/DEV/SDB5 Material_disk
Modify Add:
For example add:
/dev/sdb1/project/finished EXT4 Defaults 0 0
Label=material_disk/project_mooc/material EXT4 Defaults 0 0

The label will also appear coincident, how to handle?
Blkid list the UUID of all devices in the system
Modify the device in the/etc/fstab file to replace it with its corresponding UUID
For example:
uuid=d84d-883a/project/finished EXT4 Defaults 0 0

Linux HDD Management

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.