[parted-devel] Optimal Partition Alignment

Karel Zak kzak at redhat.com
Mon Sep 17 07:48:27 UTC 2012

On Thu, Sep 13, 2012 at 09:58:51PM +0100, Anthony Wright wrote:
> I'm trying to write a piece of code that automatically partitions and
> formats a wide range of disks. I've recently switched from fdisk and an
> MBR partition table to a parted with a GPT partition table due to the
> 2TB partition size limit of the MBR partition table.
> When I create partitions with mkpart I keep getting the message "The
> resulting partition is not properly aligned for best performance."
> The disk I'm practising on has a logical and physical sector size of 512
> Bytes, and I'm aware that the first 34 sectors are occupied by the GPT.
> If I create a partition from 34s - 9999s I get the warning. If I create
> a partition from 2048s - 9999s I don't get the warning, but I do get the
> warning for 2047s - 9999s & 1024s - 9999s.

 2048s is de facto the current standard -- it's robust and compatible
 with all usual HW (don't forget that some disks/raids lie about phy
 sector size). It's better to use 2048s if this value is compatible
 with your HW that strictly follow the phy sector size.

 However... not sure why parted complains about the alignment, 2048s
 should be a recommended value, not a strict border.


 Karel Zak  <kzak at redhat.com>

More information about the parted-devel mailing list