Partitioning alignment and formatting large disk over 2TB on linux

If you got here you probably had a problem partitioning a disk over 2TB on linux, maybe having the message you have a poor alignment on your partition.
If your answer is yes follow these easy steps, assuming your disk is /dev/sdb:
go root with su - or adding sudo right before every following command
parted -a optimal /dev/sdb

create the gpt label
(parted) mklabel gpt

(parted) mkpart
Partition name? []?
File system type? [ext2]? ext4
Start? 0%
End? 100%

Then check partitions
(parted) print
Model: ATA ST4000VN000-1H41 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB

Your partition is made and correctly aligned
Now let’s format
mkfs.ext4 /dev/sdb1
And we’re all set. You just have to mount and eventually edit your /etc/fstab file for automount on boot.