Archive for the tag 'disk space'

SBDavid

Using tune2fs to free up disk space.

Using tune2fs to free up disk space.

We usually encounter issues, where a partition becomes 100% full, say if you get / as 100%, you even can’t edit the fstab entries.

In such instance, you can use the tune2fs command to free up disk space, since for every file system under Unix, approximately 5% of disk space is reserved for the “root” user.

To check this, take the ratio of Block count to the Reserved block count. (these values can be obtained by listing the information in the specified file system’s superblock.

tune2fs -l /dev/device (it should be a partition actually)

To free up all the reserved space use,

tune2fs -m 0 /dev/device, instead of 0, you can specify 1 or 2.

The only risk in setting zero reserved blocks is that, other Unix users can fill the file system to 100%.