I need a second opinion on partition alignment of GPT partitions on a 4K sector disk.
parted /dev/sda unit s printModel: ATA WDC WD20EARS-00J (scsi)
Disk /dev/sda: 3907029168s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
As far as I know a GPT partitioned drive looks like this:
LBA 0: MBR
LBA 1-33: GPT1
LBA 34-(nsect-34): addressable space
LBA (nsect-33)-(nsect-1): GPT2
We're talking about 512 byte sectors since this 4K drive doesn't tell its real sector size to the OS (hdparm -i /dev/sda: SectSize=0). So a 4K aligned GPT partitioned drive looks like this:
[0...MBR/GPT1...33]
[34...lost...8a-1]
[8a...part1...8b-1]
[8b...part2...8c-1]
...
[8d...partk...8e-1]
[8e...lost...nsect-34]
[nsect-33...GPT2...nsect-1]
Suppose I just want 1 partition that covers the whole drive:
[0...MBR/GPT1...33]
[34...lost...8a-1]
[8a...part1...8b-1]
[8b...lost...nsect-34]
[nsect-33...GPT2...nsect-1]
To maximize the partition but keep it aligned with the 4K sectors
a = ceil(34/8.) = 5
b = floor((n-34)/8.) = 488378641
So we should make a partition that start at 8a and ends at 8b-1:
parted /dev/sda unit s mkpart primary 40 3907029127
Is this the correct way of thinking? When I do this, parted informs me that "the resulting partition is not properly aligned for best performance". Should I just ignore it?