You are not logged in.

#1 2012-11-16 18:18:02

dgbaley27
Member
Registered: 2011-07-22
Posts: 47

[SOLVED] gptfdisk: why 1 MiB alignment

I understand the alignment issue, but I don't understand why the default alignment is so high at 2048. Wouldn't something like 8 or 16 do just fine, or even 32 or 64 if you really want to plan for the future?

Last edited by dgbaley27 (2012-11-17 01:00:32)

Offline

#2 2012-11-16 22:40:18

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: [SOLVED] gptfdisk: why 1 MiB alignment

https://wiki.archlinux.org/index.php/Pa … _Alignment

The key to alignment is partitioning to (at least) the EBS (erase block size) of the SSD.

EBS sizes on most SSDs are 512 KiB, so you need to align to at least 1024 sectors. By aligning to 2048 you can be almost certainly sure that partitions are aligned properly on any SSD.

Also, 1 MiB just looks clean and elegant. There are probably other reasons for such value, unfortunately I don't know about anything more than I said.

Offline

#3 2012-11-16 22:49:39

dgbaley27
Member
Registered: 2011-07-22
Posts: 47

Re: [SOLVED] gptfdisk: why 1 MiB alignment

Thanks msthev, I think when my eyes see 512, I tend to think bytes, and missed the KiB.

Offline

#4 2012-11-16 23:33:42

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] gptfdisk: why 1 MiB alignment

I'm the author of GPT fdisk, so I can answer definitively on this one. Basically, msthev is correct; a 1MiB alignment value works well on a wide variety of disks and disk devices -- Advanced Format disks, SSDs, and RAID arrays. Just as important, 1MiB alignment is now pretty much standard -- Microsoft's tools, Apple's Disk Utility, and libparted all use it by default. Sticking with the same alignment policy means that you won't get weird things like little gaps between partitions if you switch between tools when creating partition tables. (Such gaps wouldn't really matter, but people have complained to me about more minor issues.)

Offline

#5 2012-11-17 00:34:31

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: [SOLVED] gptfdisk: why 1 MiB alignment

Thank you srs5694 for working on this tool smile


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

Board footer

Powered by FluxBB