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