Google Plus

How to change the reserved percentage for root directory in linux

Written by Mel Kham on . Posted in Linux tutorials

The GNU/Linux reserve 5% of the the storage of a partition for the root directory,  so for example if you got a apartition  of 500 GB , this mean that your root directory will got 25 Go !!! Very much  for a root directory .

Well, lets see approximatively how much space  the root partition need.

 

 

/tmp : So for example for temporary files they get deleted every once in a while to save space.

/usr :  Requires a few gigabytes of space for installing applications. It will of course grow over time as you install more applications.

/var :  May require some space, depending on what you use the machine for. For example, database software often stores databases there, and various other applications keep persistent data there so it may require some space and grow over time.

/srv : might need some space and grow over time if you’re hosting web services or FTP services, otherwise chances are your /srv will never take up much space.

Some third party software sometimes installs into /opt. If you’re installing anything like that you may need some space there, otherwise it will hardly take up any space.

/etc
: May grow a bit over time since it contains configuration files for just about everything you install, but those files don’t take up that much space so it will never get too big.

With the obvious exception of /home, the rest of the toplevel directories in / hardly need much space (some like /dev /proc and /sys don’t take up any disk space) and are unlikely to grow much with time.

So depending on how you use your machine and what you install you can even get away with as little as 5GB to 10 GB  max for your / partition (and that’s including /usr).

Now if you we take the example above of a partition of 500 Go, then 1% will be enough for the root directory, type the command bellow to change the procentage  to 1% :

tune2fs -m1 /dev/partition

This way the system will reserve 1% for the root directory.


Usefull links : soft-libre, GNUbuntu, ubuntuforums

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • http://twitter.com/iMartyn Martyn Ranyard

    Actually “reserved for root” is reserved for writing to by the root user, not for “the root directory”.  A very important distinction.  It is there so that the root user can always fix a system and that a normal non-root user cannot stop a system working by filling the disk. For instance, if you are talking about a pure data partition (such as /home) you can safely use -m0 and not have any reserved space.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

LinuxSytesNet

|

Yesterday watched a movie with Morgan Freeman called ‘ A long came a spider ‘ and must say that I was quite impressed how they exchanged encrypted messages hidden in pictures. Thank you for the tutorial :)

Bjarni

|

Excellent, thanx!

Ambiton

|

Thank you very much Chris :)

Lolman

|

in cmd

Oliver

|

Do you think that it works on a Macbook Air 1,1?… ohh and, it must be installed in a different partition than Mac OS X, right?… can´t have i installed only Ubuntu on my hard drive?

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .