In Linux, each hard disk device is mapped to a system device file. For disks, optical drives, and other ide or SCSI devices, this is no exception.
Here we need to penetrate a concept --> [some devices are all files]
The device file of the IDE disk is named by/dev/hdx, And the partition is named by/dev/hdxy. X indicates the disk (A is the first disk, B is the second disk, and so on). Y represents the Partition Number (starting from 1, 1, 2, 3, and so on) SCSI devices and partitions are named by/dev/sdx and/dev/sdxy (the naming rules for X and Y are the same as those for IDE disks ). The IDE and SCSI optical drives adopt the same naming method as the disks.
/Dev/hda/indicates the first hard disk device (master)/dev/HDB/indicates the second hard disk device (slave) of the First ide Interface) /dev/HDC and/dev/HDD are the master and slave devices on the second ide interface.
Therefore, an IDE interface can contain up to two devices, one master device and one slave device.
/Dev/sda1 indicates the first partition of the first SCSI interface hard disk.
Note: One SCSI interface corresponds to only one device, and there is no master-slave relationship.
The name of the hard disk partition file indicates the hard disk and partition.
Partition:
As mentioned above, the partition numbers are marked by numbers, such as 1, 2, 3, and 4;
The primary partition occupies number 1 to number 4, and the logical partition starts from number 5. For example, Number 6 is the first logical partition.
Exercise:
1. /dev/hdc6: The second logical partition of the master interface hard disk of the second ide interface 2. /dev/sdb1: 1st primary partitions of the second SCSI interface Hard Disk 3. the third primary partition of the master interface hard disk of the second ide interface:/dev/hda3 4. the third logical partition of the fifth SCSI interface Hard Disk:/dev/sde7