1

I have a SSD: Samsung 850 EVO 120 GB with Ubuntu 16.04 installed on it.
I want to make sure that it is aligned properly.
Here's the disk info & structure (output was trimmed for readability):

$ sudo fdisk -l

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa2b6933a

Device     Boot    Start       End   Sectors  Size Id Type
/dev/sda1  *        2048   3999743   3997696  1.9G 83 Linux
/dev/sda2        4001790 202440703 198438914 94.6G  5 Extended
/dev/sda5        4001792  35999743  31997952 15.3G 83 Linux
/dev/sda6       36001792 202440703 166438912 79.4G 83 Linux

Using parted it told me that sda2 is not aligned properly:

$ sudo parted /dev/sda align-check opt                  
Partition number? 1                                                       
1 aligned
$ sudo parted /dev/sda align-check opt 2
2 not aligned
$ sudo parted /dev/sda align-check opt 5
5 aligned
$ sudo parted /dev/sda align-check opt 6
6 aligned

Is this OK? I think that the fact that sda2 is Extended, then actually everything's OK.

0

Source and credit for answer: Brian @ https://superuser.com/questions/740107/ssd-extended-partition-misalignment

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.

  • So I was right? The Extended partition isn't even mounted - I inspected /proc/mounts and it wasn't there. So everything is OK ? – Dor Aug 24 '16 at 21:17
  • Yes, you do not directly write to extended partition, so only the partitions you directly write into need to be aligned. But that is one of the advantages of the newer gpt partitioning. With Ubuntu you can use gpt whether UEFI or BIOS. But if using Windows you can only use gpt if booting a newer system in UEFI boot mode. – oldfred Aug 24 '16 at 22:09

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.