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