Centos HDD, partition, format, mount

Source: Internet
Author: User
1. First look at how many drives are on the machine:

$ fdisk-l

2. Hard disk Partitioning

$ FDISK/DEV/SDD

N->p->1-> Enter, enter

It means creating a new primary partition, the size of which is the entire SDD disk

Last execute W, write to disk

The disk is now partitioned, but there is no file system, and the disk is still unavailable

Only one partition can be partitioned at a time, and multiple partitions need to be added multiple times.

3. Format the disk and write to the file system

$ mkfs.ext4/dev/sdd1

Wait for command execution to complete

4. Mount the new hard drive to a node on the operating system

$ MKDIR/MNT/SDD

$ MOUNT/DEV/SDD1/MNT/SDD

5. Execute the DF command to view the disk information and confirm that the new hard drive was mounted successfully

$ df

Filesystem 1k-blocks used Available use% mounted on
/dev/sda3 928204272 4191296 876862896 1%/
Tmpfs 32981876 32981864 1%/DEV/SHM
/DEV/SDA1 198337 31960 156137 17%/boot
/DEV/SDH1 961432072 204436 912389636 1%/MNT/SDH
/DEV/SDD1 961432072 204436 912389636 1%/MNT/SDD

The above bold font is the new disk.

Centos HDD, partition, format, mount

Related Article

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.