1834389 Members
1872 Online
110066 Solutions
New Discussion

File system Full

 
malki_3
Frequent Advisor

File system Full

I have a /usr file system full and I want to know why..?
There's no core on this file system.
The quot command display that bin user use 60% of space..
I can not increasing the size of this FS. How can I free some space from this FS
Thins for your help
15 REPLIES 15
Clemens van Everdingen
Honored Contributor

Re: File system Full

Hi,

Probably you have a link to /var/adm

Look in there for a lot of old syslog files or any admin files left since long time ?

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !

Re: File system Full

First thing to do is to look for files over a certain size (say 10MB in this example):

find /usr -size +10000000c -xdev -exec ll {} \;

See if you can identify any files this lists which you can delete/trim

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Steven Sim Kok Leong
Honored Contributor

Re: File system Full

Hi,

Check for any processes hanging on to opened files that have already been deleted. A reboot should resolve an open file problem.

Otherwise if you don't wish to reboot, you can use lsof to identify the process and to terminate or restart it to fix this problem.

Hope this helps. Regards.

Steven Sim Kok Leong
Tom Geudens
Honored Contributor

Re: File system Full

Hi,
You should first determine where all the space went. We use the mbused (MegaBytes used) script for this :
#!/sbin/sh
#
# Author : Tom Geudens
#
# Usage : mbused
#
if [ $# -lt "1" ]
then
echo "enter : mbused "
exit
fi

du -s -x $1/* | awk '$1=$1/2000 {printf("%s\t%sMB USED\n",$2,$1)}' |sort -n -k 2,2

Put this script in /usr/local/bin.
Next cd to /usr and execute /usr/local/bin/mbused . (the point indicating the local directory).

This should give you an idea where the space went ...

Hope this gets you started,
Tom
A life ? Cool ! Where can I download one of those from ?
John Carr_2
Honored Contributor

Re: File system Full

Hi

have you checked for rubbish in /usr/tmp

cheers
John.
Steven Sim Kok Leong
Honored Contributor

Re: File system Full

Hi,

I might have jumped the gun.

Execute a bdf (includes space held by opened files) and a du -sk (does not include space held by opened files) command. Is there any big difference from your bdf output vs your du -sk output?

# bdf /usr
# du -sk /usr

If no, follow the instructions provided by the rest and search for large files that are taking up space in /usr.

If yes, then it is likely that you have an open file that got deleted. In such cases, you will need to use lsof to identify the process to terminate it. Otherwise, a reboot suffices.

Hope this helps. Regards.

Steven Sim Kok Leong
Magdi KAMAL
Respected Contributor

Re: File system Full

Hi malki,

1. Fetch out what's under /var/adm/crash
2. du -k /var will list all the tree under /var and you can easly find out where your increasing directory(ies) is(are).

Magdi

Bill McNAMARA_1
Honored Contributor

Re: File system Full



# du -s /usr/*

to see which directory is taking up the most space.

Later,
Bill
It works for me (tm)
MANOJ SRIVASTAVA
Honored Contributor

Re: File system Full

Hi Malki

/var is a host of lots of log files which range from mail, sam,sw install ,spool, stm , tmp ( for applications ) In any case one of these is having fat log file . To find out that either you can do find with a conditon for fatter log file or just do ls -lR > /tmp/abc . and then you vi abc to see which file/files have grown . Genrally the priority that I take to check is to go /var/tmp first then to mail , stm and so on , also when u see unwnated files or fat files just empty them so that you are sure that the particular subdirecorty is not to be doubted. Also a goos place to look is stm logs that happens in case you have some recuuring soft faults and that makes stm logs go fatter.

All the best.


Manoj Srivastava
pap
Respected Contributor

Re: File system Full

Hi MAlki,

Just do following to determine who is eating more space.

1. du -k from /usr directory.
2. FInd out the directories eating more space using find command.

-pap
"Winners don't do different things , they do things differently"
Jeff Schussele
Honored Contributor

Re: File system Full

Hi malki,

Do

du -akx | sort -nr | more

This will sort, descending, the largest files in this FS (only)& will show you the hogs & let you determine what can/can't be removed.
If you have logs or tmp files being created in here then the apps/utilities creating them need to be modified to put them in their proper places.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
pap
Respected Contributor

Re: File system Full

Hi MAlki,
In case you need to increase the file system size for /usr, please do not forget to issue following command before rebooting or after making the changes.

lvlnboot -R

this is important , the failure to issue this commmand will cause failure to boot your machine next time and you will be in serious trouble.

-pap
"Winners don't do different things , they do things differently"
Jeffrey S. Sims
Trusted Contributor

Re: File system Full

If you have an ftp user in /usr you may want to see if anyone has written files to the directory to fill it up. These directories should not be writable unless you have a reason to make them writable. Then it should be monitored closely. Just a thought (yes from my experience).
Choi Eun Kyoung
Occasional Advisor

Re: File system Full

This command search over 10M file. If you find over 10M file, you can delete the file

#find / -atime 1 xdev -size +20480(over 10M)

and this command display which directory have most space
#du -ks /usr/*
SHABU KHAN
Trusted Contributor

Re: File system Full

Malki,

Each one has there own preference of finding out which files are hogging your filesystem..

Here is mine:

cd /usr
ls -lR | grep "^-" | sort -nr -k5 | more

This will list the largest file first and so on...

P.S List only files largest first recursively through the directory tree and sort the numeric field in reverse order (numeric field is size of the file)

Thanks,
Shabu