Published on

Tip to save space in linux

In linux, ext2/3/4 filesystems reserve 5% of the space to be useable only by root. For 1TB hard disk, 5% is a crime. Specially if that disk is attached only as a storage unit.

We can check how much is reserved for a partition by

sudo tune2fs -l /dev/sda7 

< Reserved block count: 8060199

Safely instruct to use 0% for a paritition which has no operating system files.

sudo tune2fs -m 0 /dev/sda7

> Reserved block count:     0

We can see how much I saved on a 600GB partition. Before:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7               605G 564G 11G 99% /mnt/nas

After:


df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7               605G 564G 42G 94% /mnt/nas