The state of partitioning tools?

What is the state of partitioning tools in Linux? Which tools are recommend and which should I stay away from? Namely I am interested in fdisk, cfdisk, sfdisk and the fdisk and cfdisk variants that come in the gnu-fdisk package. The "go to" solution these days would be parted I assume?

I am asking this because I used to use cfdisk years ago, but now I am sitting here with a new 3TB disk and cfdisk is displaying completely wrong information, it's displaying a partition as 375GB in size and free space available even so there is a single partition of 3TB and no free space. If I switch over to cfdisk from the gnu-fdisk package, it will display correct information, but now fdisk.gnu-fdisk won't display anything. Meanwhile the regular fdisk that comes by default with Ubuntu would display things correctly. sfdisk seems to work, but is lacking support for the newer GPT partition tables.

Essentially half of those tools don't seem to work properly. So should I just forget them and do everything with parted from now on? Are the gdisk tools ready for prime time or are there any drawbacks to using GPT? Are there other tools I should be aware of?


Solution 1:

For working with GPT disks, you need either something based on libparted (parted, GParted, etc.) or my GPT fdisk (gdisk, sgdisk, and cgdisk) tools. The latter come in the Ubuntu gdisk package, IIRC. Since you say you're familiar with cfdisk, I recommend you check out cgdisk, since the latter is modeled after the former, but for GPT disks.

Personally, I'd avoid the GNU fdisk package; it's an attempt to slap an fdisk-like user interface atop libparted, but the result is something that omits the functionality that makes fdisk worthwhile to begin with.

Edit (March, 2017):

The older fdisk and related tools (sfdisk and cfdisk) now support GPT, too. IIRC, Ubuntu 14.10 or 15.04 was the first version of Ubuntu to ship with the updated tools, so you should have those unless you're running an older distribution. The last I checked, my GPT fdisk provided more comprehensive support for GPT-specific features, but fdisk and its brethren should be fine for most day-to-day operations.