Hard drive representation and related knowledge in Linux

Source: Internet
Author: User

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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.