The 2 Terabyte Limit
For decades, Linux hard drives were formatted using the Master Boot Record (MBR) partitioning scheme. MBR was a brilliant standard in the 1980s, but it possesses a fatal mathematical flaw: it uses a 32-bit sector address. This means that MBR physically cannot address more than 2 Terabytes of storage. If you attach a massive 10TB SAN LUN to an older Ubuntu server running MBR, the kernel will only see 2TB, and the remaining 8TB is completely inaccessible.
To address massive modern storage arrays, the industry developed the GUID Partition Table (GPT). GPT uses 64-bit addressing, allowing partitions up to 9.4 Zettabytes (billion Terabytes).
However, legacy partitioning tools like fdisk historically struggled with GPT and often failed to properly align the partition boundaries with the physical sectors of modern 4K Advanced Format hard drives. If a partition is misaligned by even a single sector, the hard drive is forced into a “Read-Modify-Write” penalty loop for every single operation, destroying database performance by up to 50%.
To safely provision massive GPT drives and mathematically guarantee perfect sector alignment, enterprise Linux engineers rely on the parted (GNU Parted) command. parted is an advanced block-manipulation utility that supports scriptable provisioning, sub-sector alignment warnings, and on-the-fly partition expansion.
Step 1: Identifying the Raw Block Device
Before you run parted, you must explicitly identify the raw hard drive you wish to format. Use the list block command:
lsblk
Suppose you just attached a brand new, empty 10TB drive to your Ubuntu server. It appears in the list as /dev/sdc.
WARNING: parted is highly destructive. Unlike fdisk, which writes changes into memory and requires you to press ‘w’ to commit, many parted commands execute instantly on the physical disk. Ensure you are targeting the correct drive.
Step 2: Initializing the GPT Label
Launch the interactive parted prompt targeting the new drive:
sudo parted /dev/sdc
The prompt will change to (parted).
The first step is to completely obliterate any old partition headers and initialize the drive with the modern GPT standard.
(parted) mklabel gpt
If there was data on the drive, parted will throw a warning: “Warning: The existing disk label on /dev/sdc will be destroyed.” Type Yes to proceed.
Step 3: Creating a Sector-Aligned Partition
Now you must carve a partition out of the empty 10TB drive.
In the past, administrators guessed at Megabyte boundaries to align partitions. With parted, you can instruct the engine to use exact percentage markers (like 0% and 100%). parted will automatically calculate the math required to align the start sector perfectly with the physical 4K blocks of the SSD or SAN.
To create a massive partition that consumes the entire 10TB disk, using the standard ext4 filesystem identifier:
(parted) mkpart primary ext4 0% 100%
(Note: In GPT, the word “primary” is essentially meaningless as there is no limit on primary partitions, but parted syntax still requires it).
To mathematically verify that your new partition is perfectly aligned, use the align-check verb against partition number 1:
(parted) align-check optimal 1
If it returns 1 aligned, your database will operate at maximum I/O performance.
Exit the prompt:
(parted) quit
Step 4: Formatting and Mounting
The parted command only created the boundary box (the partition). It did not actually create the filesystem. You must now format the partition using the standard Linux tools.
Because the partition is massive (10TB), XFS is generally preferred over ext4 due to its superior parallel I/O capabilities for large volumes.
sudo mkfs.xfs /dev/sdc1
Create a mount point and mount the drive:
sudo mkdir -p /mnt/massive_data
sudo mount /dev/sdc1 /mnt/massive_data
Step 5: Expanding a Live Partition
The true power of parted is revealed when you need to expand a drive.
Suppose that 10TB drive is hosted on VMware. You go into VMware and expand the virtual disk to 15TB. The Linux kernel sees the new raw space on /dev/sdc, but the /dev/sdc1 partition is still trapped at 10TB.
To expand the partition boundary without destroying the data inside it, you use the resizepart verb. (This is significantly safer than the old fdisk method of deleting and recreating the partition).
Open parted again:
sudo parted /dev/sdc
Instruct it to resize Partition 1, stretching its end boundary all the way to the absolute end (100%) of the newly expanded 15TB disk:
(parted) resizepart 1 100%
(parted) quit
The boundary is now 15TB. However, the XFS filesystem on top of it still thinks it is 10TB. You must run the filesystem growth command to command XFS to expand into the new boundary:
sudo xfs_growfs /mnt/massive_data
If you run df -h, you will instantly see the live volume expand from 10TB to 15TB with absolutely zero downtime or data loss.
Conclusion
Relying on legacy MBR partition schemas and fdisk logic for modern storage architectures is a mathematical impossibility. By mastering the GNU parted utility, Linux engineers guarantee support for massive GPT volumes exceeding 2 Terabytes. The ability to programmatically align starting sectors via percentages and seamlessly stretch partition boundaries using resizepart transforms high-risk storage administration into a precise, mathematically verified, and entirely scriptable workflow.