Operating System - HP-UX
1834497 Members
2694 Online
110067 Solutions
New Discussion

HP-UX 10.20 root space running out

 
SOLVED
Go to solution
BJ Hu
Occasional Advisor

HP-UX 10.20 root space running out

Hello,

My HP-UX/9000 server root directory is gradually running out of space. I am not sure why. Can anyone tell me what I can move/delete to gain space back? I have attached the output from bdf.

Any help is appreciated.
10 REPLIES 10
Mel Burslan
Honored Contributor

Re: HP-UX 10.20 root space running out

To start with, your "/" filesystem is very small. If you have any space, I would suggest bumping it up to 300MB or more if you have more space. It will require taking the system down making an ignite tape and re-igniting your server. Search "extend root filesystem" to find the "how-to" text in forums.

To remedy the situation at hand, look for large files (files size >1MB ) on / with:

find / -xdev -size +1000000c

and see if any of these files can be deleted or moved to other places.
________________________________
UNIX because I majored in cryptology...
Pete Randall
Outstanding Contributor

Re: HP-UX 10.20 root space running out

Run "du -sk /* | sort -n", ignoring any mounted file systems in the output. This should give you a good idea of the major space occupiers and you can proceed from there. You should probably also check for core files: "find / -type f -name core".


Pete

Pete
Alberto Ochoa
Advisor

Re: HP-UX 10.20 root space running out

Hi BJ,

Check if there are some log files or temporary files being sent to your root file system by some external application or program, if possible redirect them to another FS (maybe /tmp), or create a FS for these files if you find this is the case. Also if you can find that a directory within root FS that is not part of the OS is growing, you may consider make a FS to store that data.
Learn-Share-Help, in any order.
john korterman
Honored Contributor

Re: HP-UX 10.20 root space running out

Hi,
try this command sequence to display the 10 biggest files in the root partition:
# find / -type f -xdev -exec ls -l {} \; | sort -k5n | tail -10

and be patient; if the output - when it comes - does not look suspicious, then try looking for the 20 biggest files. It sounds as if someone, who should not, keeps writing in the root partition - which I think is big enough.

regards,
John K.
it would be nice if you always got a second chance
AMAT SA
Advisor

Re: HP-UX 10.20 root space running out

Another thing to check is for core files and files under /dev which are actually not special files but some one redirected some out put in a wrong way so one of the device files is now huge. This typically happens on /dev/rmt/ devices.
Senthil Kumar .A_1
Honored Contributor

Re: HP-UX 10.20 root space running out

Hi Hu,

1)
When i saw ur BDF output, i found three VG's..vg00,vg01 and vg05..

assuming that in the past vg02,vg03 and vg04 were there and removed.. Please go to the directory /etc/lvm.conf/ and remove files vg02.conf,....vg04.conf. Safely enough you could deleted other *.conf file in /etc/lvmtab except that of vg00,vg01 and vgo5's... To be even safer could backup and deleted the unused VG's conf file.

2)
Then ofcourse you could check for core files and deleted them...

find / -xdev -name core -exec rm {} \;

3)
Investigate the /root dir, usually , sys admin tend to ingnore the fact that /root is a part of / FS and tend to keep there scripts and other analysed data in /root.. make sure the dir doesnot contain any other files and dir except for start up profiles and etc...

4)
Could also investigate the /dev dir for regular files.. where sometime , admins tend to writed regular file will involking "tar" with a wrong device file...

Hope these help..

Regards,
Senthil
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Senthil Kumar .A_1
Honored Contributor

Re: HP-UX 10.20 root space running out

typo in the first pointer..it is dir /etc/lvmconf and not /etc/lvmtab
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Eknath
Trusted Contributor
Solution

Re: HP-UX 10.20 root space running out

Hi BJ,

You can use sam to trim the log files or
in routine tasks check for selective file removal and system log files. Check the files which you can remove safely or trim them.

Cheers !!!
eknath



BJ Hu
Occasional Advisor

Re: HP-UX 10.20 root space running out

Hello all,

Thanks for all the replies. I have found that there are some log files on the /etc/opt/resmon/log directory. I moved them to another location. I did use the search function provided by some and they help me locat the log files.

I appreciate all the helps.

Cheers.
Bill Hassell
Honored Contributor

Re: HP-UX 10.20 root space running out

140 megs for / is OK as far as root for 10.20. Unfortunately, the online diagnostics store some log files in /etc, a big NO-NO for all Unix flavors. Normally, these logs don't grow very much but they do need to be watched as far as size. If they grow rapidly, it usually means there is a problem with the hardware or perhaps with the diagnostics. Make sure you have the latest (Dec 2001) diagnostic and HWE (hardware enablement) patches installed.

The best command to locate problems is NOT find, but du (I call it directory usage). Find the biggest directories first. Deleting big files (like vmunix) is not always helpful and can sometimes be a disaster. Use this to locate the biggest directories:

du -kx / | sort -rn | head -20

For a typical 10.20 system, this is the result:

26423 /
14796 /sbin
6897 /etc
3182 /sbin/fs
2966 /etc/opt
2520 /etc/opt/resmon
2318 /root
1796 /etc/lvmconf
1366 /sbin/fs/vxfs
1154 /sbin/fs/hfs

The du -kx / says to look only at /, and report size on Kbytes. Note thast /dev should be at the bottom of the list, perhaps 96 or 128 Kbytes maximum. Larger values indicate that someone (with root privileges) stored an ordinary file in /dev, a big NO-NO. If some other directory pops up towards the top of the list, then look inside using ll (and sort by size):

ll /some_dir | sort -rnk5 | more


Bill Hassell, sysadmin