Reduce amount reserved free disk space with tune2fs

In Ubuntu/Debian by default while creating ext2/ext3/ext4 file system 5% of disk space is reserved for super user across each partition.

Except for root partition 5% reserved space is not required for other partitions. So we reuse that reserved space.

We can reuse this reserved space with tune2fs command.

First get file system device path for which you want to reduce reserved space. Use df -h command to get the details:

$ df -h

Output:

Filesystem   Size   Used Avail Use% Mounted on
/dev/sda5      28G   4.7G 22G   18%       /
udev             2.8G  4.0K  2.8G   1%        /dev
tmpfs            1.2G  880K  1.2G  1%        /run
none             5.0M   0       5.0M   0%        /run/lock
none             2.9G  2.2M   2.9G  1%        /run/shm
/dev/sda7     311G 166G  131G 56%   /home

To make only 2% space as reserved on /home use following command:

$ sudo tune2fs -m 2 /dev/sda7

In above command /dev/sda7 my file system device path for /home

Now check your space details with df -h and observe the size of /home partition it should be increased.

-Sany

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s