# parted: "The resulting partition is not aligned... " [SOLVED

## Spanik

I made a 4.5TB partition with 4 1.5TB hard discs on an Areca 1200 controller. I emerged parted to make the partition. Now I keep getting the message "partition not aligned

```
(parted) print                                                            

Model: Areca ARC-1120-VOL#01 (scsi)

Disk /dev/sda: 4500GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary 0 4500G                                           

Warning: The resulting partition is not properly aligned for best performance.

Ignore/Cancel? C    

```

I googled a bit and found that with a gpt table there should be 34 sector at begin and end kept. Tried with "mkpart primary 34 8789061086" but this gave the same results. Now it is only a warning but what alignment is it talking about and how can I align it?

----------

## NeddySeagoon

Spanik,

Modern HDD starting after about 1TB can use 4kB physical sectors.  Its important for performance that filesystems are aligned on 4kB boundaries, as the drive will do read/modify/write to fake 512B physical sectors.

Because you have a big partition, parted is assuming you have a drive using 4kB physical sectors.

What counts is the underlying drive physical sector size. If you have 4kB physical sector drives, you need to take that into account in the data layout of your raid set.

----------

## prometheanfire

you can set the size with percentages to get it aligned.  start at 0% and end at 100%.

----------

## Spanik

Ok, got it now. Thanks.

I must say the manual of parted isn't very helpfull.

----------

## mwallace

 *mthode wrote:*   

> you can set the size with percentages to get it aligned.  start at 0% and end at 100%.

 

Damn, thanks a bunch for this hint. I searched like hell to find a way to align my partitions correctly. This should probably go into the Gentoo Handbook. Saves a lot of hassle and is easily understandable for every user.

Chris

----------

## majoron

 *mwallace wrote:*   

> Damn, thanks a bunch for this hint. I searched like hell to find a way to align my partitions correctly. This should probably go into the Gentoo Handbook. Saves a lot of hassle and is easily understandable for every user.
> 
> Chris

 

I agree. Thanks, mthode, for pointing it out.

Regards.

----------

