1834630 Members
2963 Online
110069 Solutions
New Discussion

/opt is 100%

 
SOLVED
Go to solution
prasadb
Super Advisor

/opt is 100%

hello all,

On some servers of HP UX the /opt becomes 100% full, users start to face problems in applications, pleas tell me what are the things that can be removed safely from the /opt files..

Thank you in advance
10 REPLIES 10
Pete Randall
Outstanding Contributor

Re: /opt is 100%

Nothing should be writing to /opt except for swinstall jobs. If you've got applications that are writing to /opt, they need to be changed.


Pete

Pete
TTr
Honored Contributor

Re: /opt is 100%

Apparently you have installed add-on software under /opt. Normally /opt does not grow but if your software creates log files and other growing files under /opt you need to take control of that software. Ideally you should install any add-on software under its own volume/mountpoint. For now you have to look for log and other files and cleanup. If you can't find anything to cleanup you have to either move files out of /opt or extend /opt.
prasadb
Super Advisor

Re: /opt is 100%

Thank you TTr, well my /opt partion is going on increasing..so please make a one more favour and let me know that whether it is safe to remove the logs generated by various applications.

Thanks
Paul Sperry
Honored Contributor

Re: /opt is 100%

just cat /dev/null on the log files.

#cat /dev/null > logfile.log

you can also use swremove to remove any software you are not using.
Pete Randall
Outstanding Contributor

Re: /opt is 100%

If you have log files under /opt, consider moving them somewhere more appropriate (like /var/opt, for example) and replacing them with a link.


Pete

Pete
prasadb
Super Advisor

Re: /opt is 100%

Thank you all who took the effort and replied..
Patrick Ware_1
Super Advisor

Re: /opt is 100%

I have found that you can also do a:

> logfile.log

instead of

cat /dev/null > logfile.log

TTr
Honored Contributor

Re: /opt is 100%

Be very carefull when you nullify a log file. It can hang the process that is using the log file. Take a look at

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1202312
Sorrel G. Jakins
Valued Contributor
Solution

Re: /opt is 100%

To start:
cd /opt
du -s * | sort -n
..now look for the biggest directory (the last line) and cd to that directory, then reissue the du + sort line above. Eventually you will get to the largest file in the largest directory.

If it is a log file, move it to /var or /var/tmp or somewhere more suitable. /opt should not grow.

If the above does not help, you may have a huge *open* file, so get a copy of lsof and grow to love it, it will tell you things you need to know.

HTH
Sorrel
Dennis Handly
Acclaimed Contributor

Re: /opt is 100%

Where are these logfiles in /opt/? This filesystem should be treated as read/only (because of diskless) and the corresponding R/W files should be in /var/opt/.