/usr is full

My /usr partition ran out of space, now i'm sitting here and thinking what to do :frowning:
What would be your suggestions? I have /home partition which is 20% full and I don't think that I will ever use the whole space. is there a way to resize my partitions without data loss?
What I was actually thinking in the beginning is to buy a new HDD, copy everything from my current /usr volume to my new HDD and then mount the new hdd instead of my old /usr. what do you think about this kind of solution?
Thanks in advance!

Hi,
I would buy a new hdd, you'll need always new spaces.

How is your file system laid out?

Normally, /usr should not grow all that much (unless you are adding a load of software)

It may be that you just have 'junk' out there - but you must be careful about what you remove.

Check out the du command and find. Look for files created in the last few days, weeks, months to figure out what is causing the partition to fill.

See if you can change where these files need to be (especially if they are some type of logs or that sort)

personally I don't use the info-pages so i removed them, probably just saved a few megs but that's at least something :slight_smile:

just now I actually did a check on my own /usr partition and noticed some programs I never use.. For example the python programming language, which I haven't programmed in for a long time..

well, my /usr wasn't that big big in the first place - 1.5GB I just installed RedHat 7.2 a week ago. installed only what I needed and I had 500mb left after installation. after that I just added few programs (zsh, opera, webmin...) and made some updates through redhat network update and ximian red carpet. now i have only 100mb left on my /usr. "du" didn't show any junk, just the stuff that is supposed to be there.

One more way you can solve the problem you are having with by freeing the hdd space. This case solve your problem a lil-bit then the harder way " Buying a new HDD "

This command will print the number of blocks used by each directory and file in the root. Most likely, the largest number printed is where you should be looking. You can then cd to that directory, and examine it. If it has sub-directories, you might use:

find . -type d -exec du -s {} \;

You can search for "large" files by cd'ing to a suspect directory ( or even starting at /, if you must), and typing

find . -size +5000 -print

will print the names of all files over 5,000 blocks (2,560,000) bytes. This may find many, many files, so you might want to refine it with larger numbers. You might also want to sort it:

find / -size +2000 -exec ls -s{} \; | sort -nr | more

Check the largest and dummy files or directories that you confirmed not using it and remove. Might save your time and your Expenses a bit.

yo, tnx for help everyone. found few dummy files and freed some 300mb. so I'm ok for some time now :slight_smile:
tnx again

D-lexy,

I am curious about a few things. First, let me tell you what I have at work. I have an N-class server in full production mode. My /usr filesystem is only 1.6 GB. This is the standard for new Boxes in my corporate environment. All of my boxes are between 1.2 and 1.6 GB for /usr.

How much software/utilities do you have loaded on this box? 1.6GB seems like plenty to me. However, your case may be unusual.

Regarding your question about filesystem reworking of /usr, that can be very dangerous for OS filesystems. Normally you have to make a backup and then add disks and recreate the filesystems and then Re-load the OS. This is a simplistic description, but close. /usr is an OS filesystem.

You can usually add disks to an OS filesystem without too much problem. Just go to single user mode and make the necessary changes. However, to use a totally different disk for /usr requires much more work. At least it does in my environment.

:cool: :smiley: