Operating System - HP-UX
1834704 Members
2760 Online
110069 Solutions
New Discussion

Re: root file system full

 
priyarajan
Contributor

root file system full

hi gurus

My root file system is showing 95%
How should i solve this problem explain step by step.

how to find and remove large files

Which files are not to be removed .
11 REPLIES 11
Ivan Ferreira
Honored Contributor

Re: root file system full

To find the 10 largest files, use:

find / -xdev -exec ls -la {} \; sort +4 -nrb | head -10
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Rick Garland
Honored Contributor

Re: root file system full

From the / filesystem

du . -xdev -ka | sort -nr more

This will list filesin the root FS in ascending order by size and will not cross filesystems.
Robert-Jan Goossens
Honored Contributor

Re: root file system full

Hi,

# du -kx / | sort -rn | head -20
28937 /
19968 /sbin
5893 /etc
3824 /sbin/fs
2784 /etc/opt
2702 /patch
2645 /etc/opt/resmon
1717 /sbin/fs/vxfs
1614 /sbin/fs/hfs
1058 /etc/lvmconf
1024 /etc/opt/resmon/lbin
981 /etc/opt/resmon/lib
567 /etc/opt/resmon/log
553 /sbin/lib
525 /etc/X11
458 /etc/hpC2400
438 /sbin/init.d
301 /root
225 /sbin/fs/cdfs
203 /root/.sw

should be something like above output, post the output.

Best regards,
Robert-Jan
Kent Ostby
Honored Contributor

Re: root file system full

find / -xdev -size +1000000c

That will give you files greater than 1 meg.

Be careful what you delete.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kent Ostby
Honored Contributor

Re: root file system full

If it's a process that's killing you, you can use the following to see what processes are generating a lot of CPU (and therefore maybe a lot of disk in root):

ps -ef | cut -c42-80| sort -nr | head
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
James R. Ferguson
Acclaimed Contributor

Re: root file system full

Hi:

In addition to the techniques already presented, look for ordinary files in '/dev/' -- files whose mode in an 'ls' listing begin with "-" instead of 'c' or 'b'.

A common mistake is to mistype a backup device filename. Instead of '/dev/rmt/0m' you type '/dev/rmt/om' and create an ordinary file of vast size.

Regards!

...JRF...
rariasn
Honored Contributor

Re: root file system full

Hy priyarajan,

1.- run attach script

ocupacion.sh / > /tmp/root.txt

2.- View file /tmp/root.txt and create directorys for applications, etc.

ran
Yogeeraj_1
Honored Contributor

Re: root file system full

hi priyarajan,

did you check for any "core" files in /

e.g.

# ll core
-rw------- 1 root root 484972 Feb 8 11:08 core
# file core
core: core file from 'bootpd' - received SIGSEGV
# rm core


regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Muthukumar_5
Honored Contributor

Re: root file system full

a) Trim your application and system log files located in /var/ directory
b) Cleanup unneeded patches as cleanup -c2
c) Find core files and delete them.
d) Chances to have source or depots files in .tar.gz or .tar file format. If you don't want to have them move to some other machine or delete it.


--
Muthu

Easy to suggest when don't know about the problem!
Deepak.R
Frequent Advisor

Re: root file system full

Hi,

Use
find / -xdev -size + -exec ll {}\;

will list all files > size mentioned.

check /etc/lvmconf/*.conf.old and delete them.

thanks
deepak
AshishJain_USA
Frequent Advisor

Re: root file system full

Hi
You may use
find / -xdev -size + -exec ll {}\;
will list all files > size mentioned.

Other things cud be

1. check /dev directory, especially if you just tried some backup
2. look for core* files in the / filesystem.
3. Ensure that all the filesystems on the system are mounted. e.g., if u have a filesystem /xyz and it is not mounted, the users/processes can still write to this filesystem eatinginto the / space.
4. check /etc/lvmconf/*.conf.old and delete them.
5. You can also trim the /var/adm/syslog/syslog.log and any other logfile in this path
thanks
ashish