I have a drive that has primary partitions and an extended partition that contains several logical partitions. It looks something like this:

--> Primary P1 (Aligned)
--> Primary P2 (Aligned)
--> Extended P3 (Misaligned)
--> --> Logical P4 (Aligned)
--> --> Logical P5 (Aligned)

Two primary logical partitions P1, P2. One extended partition container P3. And two more logical partitions P4, P5.

Does it really matter that the extended partition container (P3) is misaligned? My gut feeling says it doesn't matter, since this partition is only a container for the actual logical partitions that actually hold data. Thus, any read/writes will be aligned since they are accessing those partitions, e.g., P4 and P5. Nothing reads or writes to P3 unless we are modifying the physical partition layout.

Is this correct?

For @LPChip:

The alignment checks were done with

parted /dev/sda
align-check opt n # where n is the partition number.

Single-disk, non-raid setup.

The OS questions are irrelevant. The question has to do with sector alignment which is OS independent. I'm not asking how to align. I'm asking if alignment matters for the extended container.

  • Can you add to the post how it is configurated? like, is it using a RAID controller setup, what OS are you using and is the above seen from a tool using the OS or directly from a Raid controller setup screen? – LPChip Apr 10 '14 at 13:58

It does not matter.

What matters is the file system blocks or clusters on a formatted partition are aligned to and don't overlap more physical blocks than necessary. To do this the partition holding a file system must start on a physical block boundary.

A NTFS formatted partition with 4k cluster size on an Advanced Format drive with 4k blocks will perform worse if each NTFS cluster straddles two blocks on the drive itself due to the partition not starting on a block boundary.

  • While this answers my question, this poses a new one. All the info I've read just says to align the start sector of the partition to the physical blocks. But how can one verify the internal filesystem block structure is aligned? It seems that would be much harder to verify as internal filesystem structures (clusters, blocks) vary by filesystem (and by user set parameters--such as cluster size). – James Apr 10 '14 at 15:53
  • Filesystems begin at the first sector of their containing partitions, so unless exotic filesystem-creation options are used to throw the alignment off, checking the partition's start sector is adequate. I don't even know if it's possible to adjust the alignment of most filesystems, although the Linux LVM's pvcreate command does have some alignment options. If I'm reading the man page correctly, they could cause problems if abused. Overall, I wouldn't worry about that aspect of it. – Rod Smith Apr 12 '14 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.