Operating System - HP-UX
1752520 Members
4659 Online
108788 Solutions
New Discussion юеВ

Re: The / directory is full

 
SOLVED
Go to solution
Sp4admin
Trusted Contributor

Re: The / directory is full

Hello,

First thiing is to check for any large core files. You can also use the du -k in the current directory to see large files.
Hope this helps.

sp,
Gregory Locke
Frequent Advisor

Re: The / directory is full

It is almost always something dumb like creating a tar file but forgetting to put the entire dev name in.
Example:
WRONG: tar -cf /dev/rm filename(s)
RIGHT: tar -cf /dev/rmt/0m filename(s)
if your drive is using 0m.

Here is a little script to show the size of files/directories starting at a directory. I suggest running this at /dev to see if the culprit is in there.

Gregory Locke
Frequent Advisor

Re: The / directory is full

The attachment didn't make it. Here it is.

#! /bin/sh
#
# Program name: dir_usage
#
# Written by Gregory J. Locke, 012407
#
# Usage: execute this in the directory to be checked
for i in `/usr/bin/ls`
do /usr/bin/du -skx $i
done
Ashish Parashar
Frequent Advisor

Re: The / directory is full

Hello Hangyu

The best option is that

find / -xdev -size +50000000c -exec ll {} \; | more

where 50000000 is size in byte you can use any size.

after this command if you want to know size in Kb.. just try

du -sk ( file name with absolute path)

Above command gives expected result.

Regards

Ashish
Dennis Handly
Acclaimed Contributor
Solution

Re: The / directory is full

>Gregory: for i in `/usr/bin/ls` ...

You can replace all this by one command:
$ /usr/bin/du -ksx *

>Ashish: find / -xdev -size +50000000c -exec ll {} \;

For more performance use: -exec ll +
UVK
Trusted Contributor

Re: The / directory is full

Hi,

Use the below command to list files more than 1MB in the root file system.
# find / -xdev -size +1000000c -exec ls -lt {} \;

Use the below command to see the size of directories under root,
# du -sk | sort -n
there may be some directories which are on separate mount so compare with the bdf output to make out which are separate mounts

Also it happens in most of the cases that there may be open files which will be filling up filesystem space
Use " #lsof / " to identify the openfiles which are holding up root and try to recycle the process which is using more space.

Cheers
-------------------------------------------
Like it or worked !! Click kudos !!