1824947 Members
3622 Online
109678 Solutions
New Discussion юеВ

Root getting full

 
SOLVED
Go to solution
Ali Imran Abbas
Regular Advisor

Root getting full

My root volume is getting full, 98% used, 2% free. How can I find that what files are using most of the disk space in root /. It is /dev/vg00/lvol3 on lvm. Also what files will be causing disk space occupied, How safe it is to remove them and wat is the proceedure to make some space free here?
7 REPLIES 7
MarkSyder
Honored Contributor

Re: Root getting full

1. Check for ordinary files in /dev: typically someone will have mistyped a tape device name and created a large text file.

2. Look for core files. If you find a file called core, run the command:

file core

If it confirms that it is a core file you can delete it.

3. Check for scripts/applications that are writing to /. They should probably be given their own lvol/filesystem to write to.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Pete Randall
Outstanding Contributor
Solution

Re: Root getting full

Run "du -sk /* |sort -n" . That will give you a listing of the largest files and directories directly under the root file system. Some of these are separate mount points (i.e. /stand, /var, /usr, /tmp, /opt, and /home), so disregard them and look at the largest of the remaining - that is what is consuming all the space.

Typical culprits are regular files in /dev, usually caused by someone mis-spelling a tape device during a backup. You can find these by running "find /dev -type f" - there should be no regular files in /dev. You should also look for core files: "find / -name core".



Pete

Pete
Tim Nelson
Honored Contributor

Re: Root getting full

The most popular reason is that a typo was made during a backup and there is a file in /dev caused by this. i.e. tar cvf /dev/omn instead of /dev/0mn

find /dev/ -type f will locate the files ( dev should only have device files.

Other files are not easy.

/etc/
/dev/
/sbin/
and / itself
are the only "root" contained directories if you see others it is time to start digging.

/stand
/var
/usr
/opt
/myapp_xyz1
/mayapp_xyz2...
should all be separate mount points.

Depending on the versions of HPUX the root filesystem should contain anywhere from 120MB (11iv1)to 300MB (11iv2) your milage may vary.
vz7r1x
Regular Advisor

Re: Root getting full

Look for any recent changes like patches applied, application reconfiguration and update etc to detect the underlying reasons.

1. look for any core files in root
2. Look for /var/adm directory filling up by large log files
3. run du -ks * command to see size of subdirectories filling up root.
Mike Shilladay
Esteemed Contributor

Re: Root getting full

Hi Ali,

the command to check the root filesystem is

# du -x / | sort -rn | more

It will show you the files largest first.

The root file system is lvol3, unfortunately only you can decide if you can safely delete it as it is your system.

I have found that usually a mispelt tape device casues root to fill up.

Mike.
Ali Imran Abbas
Regular Advisor

Re: Root getting full

Hi Mike,

I just tried this, here is the output for that:

du -xk / | sort -rn | more
203760 /
154392 /etc
63200 /etc/vx
61488 /etc/lp
57440 /etc/lp/interface
49384 /etc/lp/interface/model.orig
48864 /sbin
32736 /etc/vx/type
29432 /etc/vx/static.d
28720 /etc/vx/static.d/build
16320 /etc/opt
14840 /etc/vx/type/static
10672 /etc/opt/resmon
8888 /etc/vx/type/gen
7472 /etc/opt/resmon/lbin
6720 /etc/vx/type/raid5
5928 /sbin/fs
4464 /etc/emc
4288 /etc/dt
4280 /etc/dt/appconfig
4264 /etc/dt/appconfig/types
4256 /etc/dt/appconfig/types/C
4040 /etc/lp/member

Wat do u guess?
Mike Shilladay
Esteemed Contributor

Re: Root getting full

Hi Ali,

I would suggest that /etc/lp looks like a good starting place.

Mike.