View current Linux Server partitions
DF -H
To view the current Linux server hard disk:
Fdisk-l
/DEV/SDA First Hard Drive
/dev/sdb Second Hard drive
And so on
Take/dev/sdb as a new hard drive, for example, you need to do the following to normal use
1. Partitioning
Fdisk/dev/sdb
In turn, enter
N, enter p, enter 1 , enter Enter W
2. Formatting
Mkfs-t ext4-c/DEV/SDB1
3, Mount (mount directory can be defined by itself)
Mount /dev/sdb1/opt
[Email protected]6276Mount /dev/sdb1/www_dataMountMount Point/ Www_data does not exist[[email protected]-6276mkdir /www_data[[email protected]- 6276 Mount /dev/sdb1/www_data
4. Set up auto mount on boot
VI /etc/fstab
Add a row to the last face
/DEV/SDB1 /www_data ext4 defaults 0 0
Configuration complete
Then use Df-h to see if it is properly mounted.
Restart the server system and use the DF-H command again to verify
CentOS find mounted disk is formatted and mounted