1. hard disk formatting
-
View new disk
1
fdisk -l
Usually, the name of the second hard disk will be /dev/sdb
.
-
Disk partition
1
fdisk /dev/sdb
There will be a prompt to enter the following parameters.
-
Format the disk as ext4
1
mkfs.ext4 /dev/sdb
-
Mount the disk to the specified directory
-
Auto-mount directory on boot
First find the UUID of the device.
Edit
/etc/fstab
to add a new mount entry.