ContOS7 mount hard disk

format

fdisk -l # View
mkfs.ext4 / dev / sdb1 # Format, wait for the format to complete before mounting

 

Mount

cd / # Enter the root directory

mkdir zk_disk # Create a mount point
mount / dev / sdb1 / zk_disk # Mount

df -h # View mounted hard disk information

 

Automatically mount at boot

blkid # View disk UUID and file type

vi / etc / fstab # Edit file
# Edit the system partition table (make the system mount automatically after booting), add a piece of data:
UUID = f524c7a6-4fbb-41a9-8640-54e4e0ae69c1 / zk_disk ext4 defaults 1 2

Guess you like

Origin www.cnblogs.com/jeffhong99/p/12714461.html