I have ubuntu 12.10 server, used mostly as fileserver + router. Some times ago it starts behave very strange, for example file transfer from samba server via 1GB/s link becomes very slow(less than 1MB/s)

After some research and play with network, i found that I have 100% of my / partition usage.

Filesystem                   Size  Used Avail Use% Mounted on
/dev/md1                     3.1G  3.1G     0 100% /
/dev/sda1                    105M  144k  104M   1% /boot/efi
/dev/md2                      52G  1.5G   48G   3% /usr
/dev/md4                      52G   13G   37G  26% /home
/dev/md5                      21G  181M   20G   1% /tmp
/dev/md3                     155G  824M  147G   1% /var
/dev/md6                      21G  437M   20G   3% /var/log

It's a problem, and I think to solve it by moving /lib (2.3G) folder to another directory, and mount it at startup. System is installed on software raid0, so, repartitioning will be very difficult, as I consider.

  1. Is it like a root of network problems?
  2. What problems will I face if I tried to do smth like rsync /lib folder to /home/root/lib?
  3. Can I merge /lib and /home/lib contents and then mount latter to /lib?

P.S. I wonder, how it occured. When I'm partitioning my disk, I thought, that all programms will be instaled at /home, or at user folders, which i made big enought… Where can I read about what partitions are used for what programms?

edited: At site I found:

"The directories /bin, /lib, and /etc should never be separate partitions! At boot time, only / is mounted initially. The init program needs to access files in /etc and the bootup scripts need access to commands in /bin, which may depend on files in /lib. Kernel modules required to complete the boot process are also kept in /lib. "

So, i can't move /lib to another partition. Can I clear it or smth else?

/lib/modules contains:

3.5.0-17-generic  3.5.0-26-generic  3.5.0-30-generic  3.5.0-34-generic  3.5.0-40-generic
3.5.0-23-generic  3.5.0-27-generic  3.5.0-31-generic  3.5.0-37-generic  3.5.0-41-generic
3.5.0-25-generic  3.5.0-28-generic  3.5.0-32-generic  3.5.0-39-generic  3.5.0-42-generic

Do I need all this files?

  • For removing old kernel versions (which will free up space on /), have a look at this previous, extensive, answer: askubuntu.com/a/100953/130555 – Adam C Nov 4 '13 at 17:43
  • Best to resize your / partition up to something like 10GB. Resizing can be done non destructive, in other words: you don't need to reinstall, you'll just have some down time. – thom Nov 4 '13 at 17:46
  • @AdamC Thanks! Yes, It's works well. I'll accept this answer, if it wasn't comment. – Seagull Nov 5 '13 at 5:52
  • @thom Thank you. I'll consider root resizing, but i'm afraid my skills is not enough for that yet. – Seagull Nov 5 '13 at 5:56
  • Added as an answer (as requested) :) – Adam C Nov 5 '13 at 8:40

Your best bet for freeing up space is to remove old kernel versions that you no longer need. To do so, follow this excellent and extensive guide in a previous answer (please visit and upvote):


This includes shell methods as well as graphical methods for removing the old versions. Please be aware of the recommendation (which I agree with) to keep 2 or 3 of the older revisions around. The updates are well tested, but you always want to be able to fall back to your previous running versions if something goes wrong.


It seems plausible that your fifteen installed kernels are consuming too much space on your root (/) filesystem. You can remove these with the dpkg command, at least assuming you can boot up and log in. Use the -P option, as in:

sudo dpkg -P linux-image-3.5.0-17-generic

Remove the oldest of your kernels (unless you're having problems with newer ones, in which case you should remove the least reliable ones).

You may also want to track down where space is being used via the du command, as in:

du -sx /* | sort -n

Note that this will take a while to run, but it may generate some errors before it finishes. Ignore the errors. The command will generate a sorted list of directories according to how much space they consume, with the biggest ones at the bottom of the list. You can then move into the larger of those directories, as in:

du -sx /var/* | sort -n

This example will show subdirectories of /var according to disk space used. When you discover where you disk space is being consumed, research the directory or directories in question, or perhaps the individual files that are taking up so much space. Some might be legitimately consuming lots of space, such as a mail spool if the computer is functioning as a mail server. Others might be filled with temporary files (like most files in /tmp), or might have files that have grown too large (like bloated log files in /var/log). Each of these problems must be dealt with in its own way.

Beyond this, your partitions are mis-sized. Linux places most program files in /usr, but this directory/partition seldom needs more than about 10GB of space, and often half or less of that. On most systems, these files seldom change, aside from during package updates or installations. Some other subdirectories of the root (/) partition, though, contain temporary or dynamic files, such as /tmp (used for temporary files, which can often be big) and log files in /var/log. Thus, it's often wise to create significant extra space in the root (/) partition. In fact, it's common to leave /usr as a regular subdirectory of the root (/) partition and make the latter something between 10-30GB.

The /home directory holds user files. It seldom holds program files, with the possible exception of software the individual users write themselves. On most desktop systems, /home will be relatively large, since it will hold digital photos, MP3s, MPEGs or other audio/video files, disk image files, and so on. These can all be quite large. Details vary from one computer to another, though.

  • Thank you for detailed answer! I removed unnecessary kernels. I have an separate /usr, /var, /var/log, /home and /tmp partitions, so, I thought 3G for root will be enough. For media files I have big partitions not listed above. – Seagull Nov 5 '13 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.