Naming rules for hard drive devices in Linux

Source: Internet
Author: User

This article mainly introduces the naming rules for hard disks and partitions in Linux.

Generally, for the IDE hard disk, the hard disk on the master of the first ide slot is/dev/hda, the hard disk on slave is/dev/HDB, and the master of the second slot is
The hard disk on is/dev/HDC, and the hard disk on slave is/dev/HDD. For a SCSI hard disk, it becomes/dev/SDA ~ /Dev/SDD.

Each hard disk can only have up to four primary partitions. Generally, to have more partitions, we will set extended partitions and then set logical partitions in the extended partitions. The four primary partitions correspond to/dev.
/Hda1 ~ /Dev/hda4, and the logical partitions start from hda5. Extended partitions, as a container of logical partitions, also occupy hda1 ~ One in hda4.

The following uses fdisk to view the partition information on my machine:

Disk / Dev / Hda: 4294 MB, 4294967296 Bytes
255 Heads, 63 Sectors/ Track, 522 Cylinders
Units = cylinders 16065 * 512 = 8225280 Bytes

Device boot start end blocks ID system
/ Dev / Hda1 * 1 13 104391 83 Linux
/ Dev / Hda2 14 144 1052257 + 82 Linux swap / Solaris
/ Dev / Hda3145 273 1036192 + 83 Linux
/ Dev / Hda4 274 522 2000092 + 5 Extended
/ Dev / Hda5 274 522 2000061 83 Linux

We can see that I shared three physical partitions, hda1, hda2, hda3, and an extended partition hda4, and set a logical partition hda5 in hda4.

Note that replacing the master and slave of the hard disk will change the operating system's recognition of the hard disk, so the system will often be inaccessible, to solve this problem, you may need to manually modify grub, fstab, and other locations, which is very prone to errors. Therefore, it is best not to change the slot location of the hard disk easily.

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.