Operating System - HP-UX
1833869 Members
1803 Online
110063 Solutions
New Discussion

/usr is closed to 90% full

 
SOLVED
Go to solution
Teck Sim
Frequent Advisor

/usr is closed to 90% full

What files under /usr can I safely delete?
Thanks.


T. SIM
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: /usr is closed to 90% full

1. Make sure you have a backup.

2. Anything under /usr/tmp is probably fair game.

3. The same should be true for /usr/examples.

Anything else is probably risky.

Check for core or large user files that may have snuck in.

Other than that, you'll probably need to enlarge it.

HTH,
Pete

Pete
S.K. Chan
Honored Contributor

Re: /usr is closed to 90% full

If you look closely ..
# ls -l /usr|grep -e "->"
there are some sym link directories that goes to /var
like /var/mail; /var/spool.. at least on my machine. That leaves nothing much behind for you to house keep.

- /usr/tmp

is about all I would cleanup.

You would want to do 2 things though ..
# cd /usr
# find . -name core -exec ls -l {} \;
==> list core files and if found remove them.
# find . -size +2000000c -exec ls -l {} \;
==> find out if you have any files bigger than 2MB (just an example) and see if those files really does belong here.

Other than that . 1 option
- extend /usr
You do not want to be moving system directories/files from /usr to some other location and create sym link to it.
Sachin Patel
Honored Contributor

Re: /usr is closed to 90% full

Use find command to find core file

#find /usr -name core -print

to find a file of 10000000byte = 10MB or larger

#find /usr -type f -size -10000000c -exec ls -la {} \;

Sachin
Is photography a hobby or another way to spend $
SHABU KHAN
Trusted Contributor

Re: /usr is closed to 90% full

Hi,

I would first try to find out which files are taking up space in /usr

cd /usr
ls -lR | grep "^-" | sort -nr -k 5 | more

will list biggest first and so on ...

Hope this helps !

Thanks,
Shabu
Martin Johnson
Honored Contributor

Re: /usr is closed to 90% full

You can do:
cd /usr; du -kx | sort -rn | more

This will show you usage by directory in the file system /usr.

If you need to exend /usr and it is a hfs file system, you will have to shut the box down complely, then boot in single user mode. Do a mount /usr; umount /usr, then do your extend and extendfs.

You can't just shutdown to single user mode. There are processes still running that use /usr.
Michael Tully
Honored Contributor

Re: /usr is closed to 90% full

Hi,

Analysing /usr is a little different to some of
the other filesystems. You must rememeber that
some of the directories underneath here actually belong to /var and they are shown as symbolic links.

What I would do is actually look for any large files first as suggested, but look at how the
filesystem has grown. Since /usr generally does
not grow very much, now is the time to look at
planning to increase it. If you have a copy of the On-Line JFS software loaded, you can increase this on the fly. (Assuming JFS) If not
you will need an outage regardles.

Cheers
~Michael~
Anyone for a Mutiny ?
Trevor Dyson
Trusted Contributor

Re: /usr is closed to 90% full

In most circumstances /usr is fairly static and should not surprise you by growing rapidly.

Unless you need more space to install a patch or to install a new application then I would leave it alone.

Another thing to consider is the number of megabytes (shown as kb in bdf) free. This is a more important value than % free.

My 2c discalimer applies
I've got a little black book with me poems in
Teck Sim
Frequent Advisor

Re: /usr is closed to 90% full

Thanks to all of you, all the info. has been very helpful.