Reclaim your disk space

I've just read an interesting blog on "How to get your full disc space back on ext filesystems". You might notice that when you format your hard disk, you didn't get the whole disk space. Apparently according to Danny:

The reason is: if you create an ext filesystem (no matter if with mkfs or YaST), 5 % of the filesystem get reserved for the super-user to allow e.g. root daemons to continue to write to the partition after unprivileged processes stopped because the partition is full.

Ok that's a good reason, but what if your disk is not a system partition and the system wouldn't need it at all. Well, good news, we can get it back. Here's how, according Danny's blog.

In a new filesystem, you'd do this:

mkfs -t ext4 -m 0 /dev/sdc1

And for an existing file system, you should do unmount it first then:

umount /mnt
tune2fs -m 0 /dev/sdc1

Notice the "-m" directive, it basically set the reserved to 0%.

Now you should get an increase 5% of disk space.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.