I just created a GPT disk label for the entire space on my hard disk (/dev/sda) like so:
# parted
(parted) select /dev/sda
(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Y
(parted) mkpart primary 0% 100%
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? I
(parted) quit
Upon further reading now, I realized that 'ignoring' was probably a bad idea w.r.t performance.
But...
# parted
(parted) print
Model: ATA ST33000650NS (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
5 1049kB 2097kB 1049kB bios_grub
1 2097kB 8592MB 8590MB raid
2 8592MB 9129MB 537MB raid
3 9129MB 43.5GB 34.4GB raid
4 43.5GB 3001GB 2957GB raid
(parted) align-check optimal 1
1 aligned
(parted) align-check optimal 2
2 aligned
(parted) align-check optimal 3
3 aligned
(parted) align-check optimal 4
4 aligned
(parted) align-check optimal 5
5 aligned
(parted)
So parted has aligned the partitions by itself? align-check optimal * says so.
If that's not the case, how do I check if the disk's partitions need to be re-aligned for performance? And how do i go about doing that?
If that's indeed the case,
mkpart primary 0% 100%actually automates the process of aligning partitions in all cases? Any edge cases where it wouldn't?