Linux-based sda4 and hda4-general Linux technology-Linux technology and application information. For details, refer to the following section. [I = s] This post was last edited by xiadao_81
In Linux, hard disk partitions are represented by hd * x or sd * x, where * represents a, B, c ...... ...... Numbers 1, 2, 3, and so on ...... ...... IDE Hard Disks are generally expressed as hd * in Linux or other Unix-like systems, such as hda, hdb ......, you can view it through fdisk-l. Sometimes you only have one hard disk, but hdb is displayed in the operating system, which is related to the hard disk jumper. In addition, most hdc devices are optical drive devices; if you have two hard disks: hda and hdb. SCSI and SATA hard disks are usually represented as sd * in Linux, for example, sda, sdb... take fdisk-l as the standard. We already know this, but do you notice that most of the time you don't see the hda4 or sda4 representation? This is actually the case:
Let's look at an example:
The following information can be found through fdsik-l:
Disk/dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/hda1*1 765 6144831 7 HPFS/NTFS
/Dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/Dev/hda3 2806 9729 55617030 5 Extended
/Dev/hda5 2806 3825 8193118 + 83 Linux
/Dev/hda6 3826 5100 10241406 83 Linux
/Dev/hda7 5101 5198 787153 + 82 Linux swap/Solaris
/Dev/hda8 5199 6657 11719386 83 Linux
/Dev/hda9 6658 7751 8787523 + 83 Linux
/Dev/hda10 7752 9729 15888253 + 83 Linux
Through this example, we can see that the primary partition has 3, from the hda1-hda3, the extended partition by the hda5-hda10; this hard disk does not have the primary partition 4, so it does not show the primary partition hda4; but the logical partition cannot start from 4, because it is the location of the primary partition. Do you understand? That is to say, three primary partitions and one extended partition are divided into all logical partitions. Therefore, hda4 is an extended partition, and the logical partition must start from 5! (Think about windows partition)
Reasonable partition planning is very important. For a disk partition, a disk should have four primary partitions, And the expansion is also considered a primary partition. The following situations exist:
1) partition structure: four primary partitions without extended partitions; [primary | partition 1] [primary | partition 2] [primary | partition 3] [primary | partition 4], in this case, if you want to divide more than five partitions on a disk, this will not work;
Three primary partitions have one extended partition. [primary | partition 1] [primary | partition 2] [primary | partition 3] [extended partition] |
[Logic | partition 5] [logic | partition 6] [logic | partition 7] [logic | partition 8] ......
This situation works, and the degree of freedom of partitions is relatively large. partitions are not restricted and can be divided into more than five partitions. This is just an example;
2) The most reasonable partitioning method;
The most reasonable partition structure: the primary partition is in the front, the extended partition is in the back, and then the logical partition is divided in the extended partition; the number of Primary partitions + the number of extended partitions should be controlled within four; for example, the following partition is better;
[Primary | partition 1] [primary | partition 2] [primary | partition 3] [extended partition]
|
[Logic | partition 5] [logic | partition 6] [logic | partition 7] [logic | partition 8] ......
The most unreasonable partition structure: the primary partition is surrounded by extended partitions; for example, the following;
[Primary | partition 1] [primary | partition 2] [extended partition] [primary | partition 4] [Blank unpartitioned space]
|
[Logic | partition 5] [logic | partition 6] [logic | partition 7] [logic | partition 8] ......
In this way, [extended partitions] between [primary | partition 2] and [primary | partition 4] have degrees of freedom, but what should I do if [blank and unpartitioned space] After [primary | partition 4? Unless primary partition 4 fully utilizes the space after the extended partition, it is impossible for you to create another partition after primary partition 4, making it impossible to divide logical partitions; although this method complies with the criteria of four primary partitions of a disk, the partitioning method of the primary partition surrounding the extended partition is not available;
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