1834032 Members
2261 Online
110063 Solutions
New Discussion

opt/ directory is full

 
Amaraa
Advisor

opt/ directory is full

We using HP DL360 OS is Suse 10.1
I need help for my opt/ directory is full
i used #df -h
i see this one
[root@bgc-site-nms01 ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/cciss/c0d0p3 9.7G 1.3G 8.0G 14% /

/dev/cciss/c0d0p1 99M 11M 83M 12% /boot

none 506M 0 506M 0% /dev/shm

/dev/cciss/c0d0p2 29G 25G 2.9G 90% /opt

/dev/cciss/c0d0p7 2.0G 36M 1.8G 2% /tmp

/dev/cciss/c0d0p5 4.9G 1.9G 2.7G 41% /usr

/dev/cciss/c0d0p6 4.9G 220M 4.4G 5% /var

[root@bgc-site-nms01 ~]#

Opt directory contains 5.7GB but there is used size is 25Gb.Where is 19GB.I need help plz

sorry my poor enlish

** edited to remove profanity to comply with forum guidelines **
8 REPLIES 8
Fabian Briseño
Esteemed Contributor

Re: opt/ directory is full

Hello amaraa.

Please watch your languaje.

Nos to your problem. Maybe you opt filesystem is directed to another mount point, check you /etc/fstab file

to see that everithing checks out.

Also look at your syslog.log file
Knowledge is power.
Amaraa
Advisor

Re: opt/ directory is full

#vi /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details

LABEL=/ / ext3 defaults 1 1

LABEL=/boot1 /boot ext3 defaults 1 2

none /dev/pts devpts gid=5,mode=620 0 0

none /dev/shm tmpfs defaults 0 0

LABEL=/opt /opt ext3 defaults 1 2

none /proc proc defaults 0 0

none /sys sysfs defaults 0 0

LABEL=/tmp /tmp ext3 defaults 1 2

LABEL=/usr /usr ext3 defaults 1 2

LABEL=/var1 /var ext3 defaults 1 2

LABEL=SW-cciss/c0d0p8 swap swap defaults 0 0

/dev/hda /media/cdrom auto pamconsole,exec,noauto,managed 0 0

/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0



[root@bgc-site-nms01 opt]# ls



AdventNet AdventNet.orig lost+found



[root@bgc-site-nms01 /]# du -h /opt | sort -rn | more



5.7G /opt

5.4G /opt/AdventNet

1.2G /opt/AdventNet/ME/OpManager

4.2G /opt/AdventNet/ME/ServiceDesk

319M /opt/AdventNet.orig

16K /opt/lost+found

Dennis Handly
Acclaimed Contributor

Re: opt/ directory is full

>/opt directory contains 5.7GB but there is used size is 25Gb.
/dev/cciss/c0d0p2 29G 25G 2.9G 90% /opt

Your du command wouldn't find files that were unlinked but still open. You should try:
$ fuser -cu /opt

Was the -h in du a typo? You might want to do:
$ du -kxs /opt/* | sort -rn
Amaraa
Advisor

Re: opt/ directory is full

[root@bgc-site-nms01 ~]# fuser -vu /opt



USER PID ACCESS COMMAND

/opt root kernel mount /opt



[root@bgc-site-nms01 ~]# du -kxs /opt/* |sort -rn

5613100 /opt/AdventNet

326188 /opt/AdventNet.orig

16 /opt/lost+found

Dennis Handly
Acclaimed Contributor

Re: opt/ directory is full

># fuser -vu /opt

I asked for -cu. I can't find -v as valid?

#> du -kxs /opt/* |sort -rn

Ok, your numbers indicate something is missing.

You could also check with:
$ bdf /opt
Amaraa
Advisor

Re: opt/ directory is full

Thanks for all of your help.I fixed problem problem was a Java application.Restart server result is
Filesystem 1K-blocks Used Available Use% Mounted on

/dev/cciss/c0d0p3 10080520 1272816 8295636 14% /

/dev/cciss/c0d0p1 101086 11260 84607 12% /boot

none 517312 0 517312 0% /dev/shm

/dev/cciss/c0d0p2 30233928 6018096 22680020 21% /opt

/dev/cciss/c0d0p7 2016016 35848 1877756 2% /tmp

/dev/cciss/c0d0p5 5036284 1956700 2823752 41% /usr

/dev/cciss/c0d0p6 5036284 258460 4521992 6% /var
Amaraa
Advisor

Re: opt/ directory is full

Thanks all
MHudec
Frequent Advisor

Re: opt/ directory is full

Issue was not the java application (though it's restart solved the stuff), issue was that there was file(s) which was(were) owned by that java application process still when they are deleted. Simple deletion will just remove the link (the file you see in ls etc.) to the inode. But it will not free up that inode as it is still being held by process.

Always verify via fuser, which process is holding the file before doing any removals.

In these cases, with unexplainable missing disk space, try to run lsof on the device.

Like:
lsof | grep /opt
Or:
lsof +aL1 /opt

Hope this helps next time.