HowTo: Reclaim reserved disk space on non-system drives taken by the Ext3 filesystem.

I made a rather alarming discovery today, quite by accident.

Like most people, I use an external hard-drive to backup data to, or to shift things around if I’m low on space on my PC’s internal drive. Well, today that external drive reported that it was full. Damn.

So I fire up Ubuntu’s Disk Usage Analyser, aka Boabab, to find out what’s consuming the most space. I use a 1TB external drive and it’s formatted total is about 916GB, which is about right, however Boabab reported that the total consumption of data on the drive only added up to about 860GB – wtf? Even Nautilus’s Volume Properties window was reporting that the drive still had 50GB-odd free, so why is the system telling me it’s full?

I use Ext3 on my drives and, being a journalled filesystem, some space on the drive is reserved to record these journals among other functions which is expected, but 50GB worth? I did some research and found out that the Ext3 filesystem reserves 5% of disk space by default for itself! In this day and age of large drives, that’s a huge chunk of lost space!!

Thankfully there is a way to tell Linux not to reserve so much space. Read on…

  1. First up, unmount your drive. You can do that by either right-clicking on the drive icon on the desktop and choosing “Unmount volume” or by clicking on the Eject icon next to it in the Places pane of any Nautilus window.
  2. Next, open up a terminal and type the following:

    $ sudo fdisk -l

    This will list all your available drives. Identify which one is your external drive and take note of the device name, eg: in my case my external drive appears as /dev/sdb with one partition on it, sdb1.
  3. Now type in the following:

    $ sudo tune2fs -m 1 /dev/sdb1

    This will modify the filesystem on that drive, on that one partition, to only reserve 1% instead of the default 5%.
  4. Now re-mount your drive by clicking on its name in the Places pane in a Naultilus window.
  5. The Nautilus Device Properties window will still show the same free space as before, because it reports the true total free space, but any Nautilus File Manager window only reports usable free space, which in the case of my external drive had now freed up a very sizable 37GB!
  6. Lather, rinse, repeat on any other non-system drive partitions on the same or different drive you want to reclaim space back for.

You learn something new everyday. Smilie: :)