General
===================================
When checking for free space, only 2.7G are available.
But when checking for used space, there should be 15Gb Available.
Where did 12Gb gone?
oracle@my_server:/software/oracle>% du -sh * |sort -nr | head -10
150M diag
16K lost+found
12K cfgtoollogs
5.2M admin
4.4G 111
3.9M installers
2.9M oracle
oracle@my_server:/software/oracle>% df -hP | grep oracle
/dev/mapper/Volume00-LogVol07 20G 16G 2.7G 86% /software/oracle
Where are 12Gb gone?
===================================
Look for deleted files, which were not really deleted
===================================
These files should have been deleted, but are locked by a process that prevent them from being deleted.
For example:
/software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
The solution would be to kill the locking process.
And the file would be erased from disk by Linux OS.
Be Careful!!! - Do not to kill oracle background processes!
There are many (deleted) files
run this as root
run this as root
lsof -n | grep /software/oracle | grep -v lib | grep -v dbs | grep -v bin | grep -v msb | grep deleted
or
lsof | grep /software/oracle | grep deleted
or
lsof +L | grep /software/oracle | grep deleted
oracle 26032 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)or
lsof | grep /software/oracle | grep deleted
or
lsof +L | grep /software/oracle | grep deleted
oracle 26032 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26036 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26036 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26040 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26040 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26044 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26044 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26048 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26048 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26052 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26052 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26056 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26056 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26060 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26060 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26064 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26064 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26068 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26068 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26119 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26119 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
oracle 26123 oracle 11w REG 253,8 13428 99120 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trc (deleted)
oracle 26123 oracle 12w REG 253,8 257 99121 /software/oracle/diag/rdbms/igt/igt/trace/igt_ora_25871.trm (deleted)
lsof -n | grep /software/oracle | grep -v lib | grep -v dbs | grep -v bin | grep -v msb | grep deleted | wc -l
72
Some are locked by Oracle Background processes:
oracle@my_server:/software/oracle>% ps -ef | grep 26032
oracle 26032 1 0 2018 ? 18:32:38 ora_dbw0_igt
Some are locked by regular sessions:
oracle@my_server:/software/oracle>% ps -ef | grep 31779
oracle 31779 1 2 2018 ? 3-14:05:48 oracleigt (LOCAL=NO)
These can be killed:
oracle@my_server:/software/oracle>% kill -9 31779
After killing the locking processes, the used disk is down to 4.7G
Which is in sync with
oracle@my_server:/software/oracle>% du -sh * |sort -nr | head -10
150M diag
16K lost+found
12K cfgtoollogs
5.2M admin
4.4G 111
3.9M installers
2.9M oracle
oracle@my_server:/software/oracle>% df -hP | grep oracle
/dev/mapper/Volume00-LogVol07 20G 4.7G 14G 26% /software/oracle
/dev/mapper/Volume00-LogVol07 20G 4.7G 14G 26% /software/oracle
===================================
One more example
===================================
vbda 5488 root 4r DIR 253,25 4096 2 /backup/ora_online
vbda 5488 root 5r DIR 253,25 0 4685825 /backup/ora_online/for_backup/20191107_1622 (deleted)
su 7703 root cwd DIR 253,25 4096 2 /backup/ora_online
bash 7807 root cwd DIR 253,25 4096 2 /backup/ora_online
lsof 9371 root cwd DIR 253,25 4096 2 /backup/ora_online
grep 9372 root cwd DIR 253,25 4096 2 /backup/ora_online
lsof 9373 root cwd DIR 253,25 4096 2 /backup/ora_online
bash 28238 shdaemon cwd DIR 253,25 4096 2 /backup/ora_online
root@my_server:/backup/ora_online>% ls -l /backup/ora_online/for_backup/20191107_1622
ls: /backup/ora_online/for_backup/20191107_1622: No such file or directory
root@my_server:/backup/ora_online>% rm -f /backup/ora_online/for_backup/20191107_1622
root@my_server:/backup/ora_online>% lsof | grep online
su 7703 root cwd DIR 253,25 4096 2 /backup/ora_online
bash 7807 root cwd DIR 253,25 4096 2 /backup/ora_online
lsof 11300 root cwd DIR 253,25 4096 2 /backup/ora_online
grep 11301 root cwd DIR 253,25 4096 2 /backup/ora_online
lsof 11302 root cwd DIR 253,25 4096 2 /backup/ora_online
bash 28238 shdaemon cwd DIR 253,25 4096 2 /backup/ora_online