Problem:
After removing files that unnecessary df command still shows %100 usage for "/appdata" or root filesystem.
Solution:
- Linux:
Check if is there any existing "deleted" file for the Linux machine. Check the process and kill them. The example which I added below, user remove nohup.out file but because of hanged process still getting %100 usage for /appdata mount point. After kill hanged process problem fixed.
[root@TEST appdata]# lsof | grep 'deleted' gpm 4120 root 0u CHR 136,0 2 /dev/pts/0 (deleted) gpm 4120 root 1u CHR 136,0 2 /dev/pts/0 (deleted) gpm 4120 root 2u CHR 136,0 2 /dev/pts/0 (deleted) perfalarm 4403 root 5u CHR 136,0 2 /dev/pts/0 (deleted) java 29920 vipadmin 1w REG 253,1 12430225408 491548 /appdata/nohup.out (deleted) java 29920 vipadmin 2w REG 253,1 12430225408 491548 /appdata/nohup.out (deleted) [root@TEST appdata]# kill -9 29920 [root@TEST appdata]# kill -9 29920
Total size of removed files:
#lsof | awk '/deleted/ {sum+=$7} END {print sum}'
- Solaris:
#ls -ld /proc/* | grep '(deleted)
-Also you can install lsof command for Solaris and use same command which you used in linux.I always prefer to use IBMlsof instead of SMClsof. You can install IBM lsof package from the link which I added below.
root@TEST appdata]# lsof | grep 'deleted'
-Another way find out the process which use free space:
#find /proc -links 0 -type f -size +XXXXc -ls
- HP-UX
]#lsof +L1 | grep REG | sort -k7n | tail root@TEST appdata]# lsof | grep 'deleted'