1752808 Members
5774 Online
108789 Solutions
New Discussion юеВ

Re: Root 100%

 
SOLVED
Go to solution
Shem_1
Occasional Contributor

Root 100%

What can I clear off to get some free space without adverse effect?
Port 80 on HP-UX 11.0
14 REPLIES 14
Michael Steele_2
Honored Contributor

Re: Root 100%

If / is 100% then try these commands:

# find /dev -type f

# find / -xdev -ctime 0 (* files accessed today *)

du -x / | sort -rn | more (* list largest first *)

Support Fatherhood - Stop Family Law
Con O'Kelly
Honored Contributor

Re: Root 100%

Have a look for any core files
find / -type f -name "core" -xdev -print

Core dump files can quickly fill / filesystem.

Cheers
Con
Steven E. Protter
Exalted Contributor
Solution

Re: Root 100%

This is an extremely serious situation and can quickly render your server useless and in need of disaster recovery.

Follow the previous advice and if possible shut down oracle and everything else running on this machine until the situation is resolved.

Running an 11.00 system like this can lead to the /etc/group or /etc/passwd file being hammered and dropped to zero bytes.

Running an 11.11 system can like this can result in the system suddenly refusing logins.

Another place to look for big files is /dev/rmt

You should see a bunch of files that look strange with ll or ls -la command. Those are tape drivers.

A common mistake when archiving to tape with say cpio is to direct the output to /dev/rmt/Om instead of zerom 0M

This can create a large file that quickly fills the root filesystem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fragon
Trusted Contributor

Re: Root 100%

Hi,
Are there any file(s) really necessary to be put on /? Just get rid of some unnecessary file(s) follow the way given by Steel & Con. You always should put file(s) to a mount point first.

BTW,please assign points to others who really help you! ..."This member has assigned points to 0 of 30 responses to his/her questions."

-ux
twang
Honored Contributor

Re: Root 100%

2 ways to get more free space:
- remove some unnecessary files, such as core dump, very large logfiles...
# find / -xdev -size +1000 -depth -print
- check how much "Free PE" on vg00 could be allocated to lvol3(/)
# vgdisplay /dev/vg00
Punithan
Advisor

Re: Root 100%

Hi Shem

i been face the same problem....
and i try with this script and it help me lot.
System Engineer
Shem_1
Occasional Contributor

Re: Root 100%

Thanks guys for the feedback.

Are you suggesting that I should delete these files?
Port 80 on HP-UX 11.0
Con O'Kelly
Honored Contributor

Re: Root 100%

What files are you talking about?
If you mean core files, then yes its OK to delete them. I would be very careful removing any other files from / Filesystem unless you know what they are.

If you post the name of the files that you believe are causing the problem then I'm sure someone can advise you.

Cheers
Con
Bill Hassell
Honored Contributor

Re: Root 100%

Here is the fastest way to locate large areas that need attention (notice I didn't say large files?):

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

This will give you a list something like this (for a 'normal' root directory):

29213 /
18979 /sbin
8586 /etc
6345 /etc/opt
3676 /sbin/fs
3259 /etc/opt/samba
3235 /etc/opt/samba/codepages
2733 /etc/opt/resmon
1657 /sbin/fs/vxfs
1585 /root
1550 /sbin/fs/hfs

(I didn't paste anything smaller than 1000kb)

So / is only 29megs and /sbin is 19megs, pretty typical. If ANY directory pops to the top larger than that, then look inside the directory for big files. /etc is a common one because a spelling error can create massive files by accident. /etc should be about 8-12 megs.

Another common problem are bad applications that store themselves in / instead of /opt or /usr. These apps need to be moved and if the aqpps can't run properly in the correct directory structure, use symlinks to fool the app.

You can remove all core files. You may also find giant files in / because this is the (terrible) default location for root's home. It is best to create a separate /root or perhaps /home/root in order to keep root 'droppings under control. The sysadmin ideal is to NEVER allow ordinary files in /, just directories and mountpoints.

Post the contents of some big directories and we can tell what to do with the files.


Bill Hassell, sysadmin