Trouble creating 3TB ext4 partition due to msdos-partition-table-imposed error

I just bought a 3TB WD green drive, but when I try to partition in in gparted I get an error like:

======================
libparted : 2.3
======================
partition length of 5860530176 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295

And when I try with Ubuntu "Disk Utility" I get a similar error like:

Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/sdc, start=0, size=3000592982016, type=0x83
Entering MS-DOS parser (offset=0, size=3000592982016)
MSDOS_MAGIC found
looking at part 0 (offset 0, size 0, type 0x00)
new part entry
looking at part 1 (offset 0, size 0, type 0x00)
new part entry
looking at part 2 (offset 0, size 0, type 0x00)
new part entry
looking at part 3 (offset 0, size 0, type 0x00)
new part entry
Exiting MS-DOS parser
MSDOS partition table detected
containing partition table scheme = 0
got it
got disk
new partition
Error: partition length of 5860528002 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295
ped_disk_add_partition() failed

Solution 1:

The traditional partition table format used on PCs includes a 32-bit field to record the number of sectors a particular partition covers.

With 512 byte sectors, this sets the maximum partition size at 2TB (512 * 232).

If you need a partition larger than 2TB, you will need to repartition the drive using the GUID Partition Table (GPT) format for the disk. If you are not trying to boot off this new disk, you are unlikely to run into any compatibility problems.

Using GParted, you can do this by going into Device->Create Partition Table and select "gpt" from the list.

Solution 2:

To complement James Henstridge's answer for computer's w/out gparted: you can achieve the same result from the command-line with parted. For the example below, I use the drive name sdX (though yours might be sdb, sdc, ...)

sudo parted
(parted) select /dev/sdX
(parted) mklabel gpt
(parted) mkpart primary 0% 100%
(parted) quit
sudo mkfs.ext4 /dev/sdX1

Solution 3:

You can also use gdisk. In my case, it was able to convert a disk with existing partitions and data from MBR to GPT, keeping everything intact. However, YMMV.

You can find more information about it on the ArchLinux forums. The process looks something like this:

$ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************