If a new hard disk is added, it is automatically detected in Linux. It is/dev/SDD. to partition, we should first clarify something about the partition: A disk can be divided into 16 different partitions, which mainly correspond to three partition structures:
Primary Partition: You can create up to four instances, one of which must be an activity.
Extended partition: External partitions are called extended partitions. Extended partitions are further subdivided into logical partitions.
Logical Partition: A maximum of 12 logical partitions can be created.
1. Run the "fdisk-L" command to view the hard disk information. This is part of my hard disk information.
The new hard drive is/dev/sdb.
2. Partition the new hard disk. Enter the command "fdisk/dev/SDB" on the terminal to go to the partition page. Enter m to display the available command:
I just added a primary partition here, so that is, N-> P, the partition number is 1, and I use the default partition size.
Save W and exit Q. Go back and run the "fdisk-L" command to check whether a partition is added to/dev/SDB:
3. Format partitions
Use the command "mkfs-T ext3/dev/sdb1" to format the file.
4. Mount partitions
Run "Mount/dev/sdb1/opt/new_disk" and run "DF-th" to check whether the disk is mounted.
Already mounted. OK