0

I have a 1000 GB USB HDD that I'm trying to partition and then format in ext4. It was previously formatted in ExFat and provided 931.3G of space.

lsblk -f

Disk formatted in ExFat

However, with ext4, it only has 869.2G of usuable space.

lsblk -f

Disk formatted in ext4

I'm running Ubuntu Linux 21.04. I've tried partitioning the drive with fdisk and parted, but in both cases I only get 869.2G of space. Any help on using parted or fdisk to maximize the partition size using the ext4 file system would be greatly appreciated.

Perhaps ext4 has more overhead than ExFat?

youngfong
  • 3
  • 2
  • 2
    probably just a misunderstanding between GB and GiB: 931.3GB = 867GiB – phuclv Aug 21 '21 at 00:41
  • Will the ExFat partition be listed in GB and the ext4 partition in GiB? – youngfong Aug 21 '21 at 01:07
  • no, it depends on the tools. They're simply different units. Modern macOS and Linux GUI tools use decimal units but if you use Linux CLI tools then it's usually binary units, so the number will be smaller – phuclv Aug 21 '21 at 01:28
  • please show the output of fdisk -l (don't take screenshots of texts, just copy and paste here) or the screenshot of gparted – phuclv Aug 21 '21 at 02:05

1 Answers1

1

When I run df -H

The 1000GB HDD displays as 1.0 T when formatted in ExFat but 984G when formatted in ext4

exFAT is a very simple file system with low overhead, so formatting a 1TB drive will you almost 100% the usable space. However ext4 needs far more space for metadata and the available space for you is much lower. Besides ext4 reserves 5% of the space for the root by default, which means 50GB on a 1TB partition. To check that run the below command:

tune2fs -l /dev/sdaX | grep 'Reserved'

You can use mkfs.ext4 -m 1 to reduce the reserved space to 1% and df -H will show significantly more free space

See also

phuclv
  • 628
  • 1
  • 8
  • 38