DiyMediaServer
Featured image of post Master the Basics - How to Use parted to Create Partitions Format Them and Add a Mount Point

Master the Basics - How to Use parted to Create Partitions Format Them and Add a Mount Point

Disk setup made easy: why parted beats fdisk for large drives and GPT partitions

You bought a new multi-terabyte drive for your media server and you’re ready to slap it into service. Hold up. Before you run fdisk like it’s 1999, you should know it’s no longer the right tool for the job. If your drive is over 2TB, you need GPT instead of MBR. fdisk can’t create GPT partitions. So parted is the way to go.

I’ll walk you through how to use parted to create partitions, format them, and set up automatic mounting with fstab. I’ve run this exact sequence on every new drive I’ve added to my mergerFS pool.

Why Parted Over Fdisk?

fdisk only works with MBR partition tables, which caps your partition sizes at 2TB. That’s a deal-breaker for modern drives. parted works with both MBR and GPT, and it doesn’t care how big the drive is.

It also has better support for scripting, alignment, and resizing. If you’re working with advanced setups or want to future-proof your system, parted is the tool to learn.

fdisk vs parted: Feature Comparison

Featurefdiskparted
Partition Table SupportMBR (Master Boot Record) onlyMBR and GPT (GUID Partition Table)
Maximum Disk SizeUp to 2TBSupports disks larger than 2TB
Partition ResizingNot supportedSupports resizing and moving partitions
Filesystem CreationNo (requires separate tools like mkfs)Yes (can create filesystems during partitioning)
User InterfaceText-based, menu-drivenCommand-line and scriptable interface
Advanced FeaturesBasic partitioning tasksAdvanced features like alignment and scripting
Best Use CaseSimple setups with MBR partitioningComplex setups, large disks, GPT partitioning

When to Use Each Tool

  • Use fdisk for straightforward partitioning on disks smaller than 2TB using the MBR scheme. Fine for legacy systems and simple setups.
  • Use parted for disks larger than 2TB, anything that needs GPT, or anything that needs resizing and scripting. This is the modern default.

Setting Up Your New Drive with Parted

Here’s how to prep that new drive with parted.

Step 1: Identify the Target Disk

Run:

lsblk

Look for the disk you installed. If it’s /dev/sdb and shows no partitions, that’s the one.

⚠️ Triple-check you’ve got the right disk before you do anything else. Wipe the wrong one and you’ll cry.

Step 2: Install and Launch Parted, Then Create a GPT Partition Table

Install parted and xfsprogs:

sudo apt install parted xfsprogs

Start parted:

sudo parted /dev/sdb

Set the disk label to GPT. This is what you want for drives over 2TB or UEFI systems:

mklabel gpt

Step 3: Create a New Partition

Still inside parted:

mkpart primary xfs 0% 100%

Swap out xfs for another filesystem label if you plan to use ext4 or btrfs later. This step doesn’t actually format the drive. It defines what it’s for.

Now type:

quit

Then:

sudo partprobe /dev/sdb

Step 4: Format the New Partition

Run:

sudo mkfs.xfs /dev/sdb1

You can use ext4 if you prefer. For media servers handling big files, XFS is fast and reliable.

Step 5: Create a Mount Point

Say you’re adding a 5th disk to a mergerFS pool:

sudo mkdir -p /mnt/pool0/disk5

Step 6: Mount It for Testing

Test it before you make anything permanent:

sudo mount /dev/sdb1 /mnt/pool0/disk5

Check that it worked:

df -h

You should see /dev/sdb1 mounted at /mnt/pool0/disk5.

Step 7: Add It to fstab

First, grab the UUID:

sudo blkid /dev/sdb1

You’ll get something like:

UUID="abc123-xyz789" TYPE="xfs"

Copy the UUID.

Edit your fstab:

sudo nano /etc/fstab

Add this line:

UUID=abc123-xyz789 /mnt/pool0/disk5 xfs defaults 0 0

Save and exit.

Step 8: Test Your fstab Config

Unmount the drive:

sudo umount /mnt/pool0/disk5

Now reload fstab:

sudo mount -a

No errors? You’re good.

Wrapping Up

parted is the right tool when you’re working with modern storage. You’ve now set up your drive with a GPT table, created a partition, formatted it, and wired it into fstab. All without hitting the 2TB wall that haunts fdisk.

Next time you drop a new drive into your rig, reach for parted first.

Don’t have a new drive yet? Pick one up here:

Seagate Barracuda 24TB Internal Hard Drive

Seagate Barracuda 24TB Internal Hard Drive

Contains affiliate links. I may earn a commission at no cost to you.

Was this useful?

Last updated on May 20, 2026 06:56 MDT