+2 TB Partitions and +16 TB Filesystems

To make partitions larger than 2TB, a normal DOS partition table will not work. We have to use a GPT partition table to support +2TB partitions. This is easily done with the parted tool. Below we label the /dev/sdb device as GPT and create one large partition (of type XFS in this case) which spans the entire disk:

parted /dev/sdb
mklabel gpt
mkpart primary xfs 1 -1
quit

You need XFS if you want +16TB filesystems for now… ext4 will work up to 12TB, but should support larger partitions anytime soon . Here we format the partition as a XFS filesystem:

mkfs.xfs -d name=/dev/sdb1 -L export 

The device is now ready to mount. The required tools can be installed on a Debian/Ubuntu distribution with:

apt-get install parted xfsprogs