Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

How to release deleted file size without reboot of server

Posted by Mir Sayeed Hassan on December 31st, 2017

How to release deleted file size without reboot of server

Check the size of the disks:

[root@DB ~]# df –h

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_db-root 22G   16G  5.0G  76% /
tmpfs                  20G   72K   20G   1% /dev/shm
/dev/sda1             477M   79M  370M  18% /boot
/dev/sdb1             3.3T  3.2T     0 100% /oradata     ---- Its shows “0”  size available

Find the actual size used:

[root@DB ~]# du -sh /oradata
509G    /oradata

View the deleted files & kill those session

[root@DB ~]# lsof +L1 /oradata
or
[root@DB ~]# lsof | grep deleted
COMMAND   PID   USER   FD   TYPE DEVICE    SIZE/OFF NLINK      NODE NAME
nc        829   root  cwd    DIR   8,17        4096     2 155320321 /oradata/backup
nc        829   root    1w   REG   8,17 46035176800     1 155320341 /oradata/backup/df_TAJMI_20171229_4028.bck
oracle  25468 oracle  256u   REG   8,17 23557316608     0 144441407 /oradata/datafiles/o1_mf_system_cbf57qpy_.dbf ( deleted)
oracle  25468 oracle  257u   REG   8,17 26738696192     0 144441408 /oradata/datafiles/system02.dbf (deleted)

The above files are deleted by using the rm command & size is not release by OS as per expected, Therefore you can release the size by killing the deleted file session

Kill the deleted files:

# kill -9 
# kill -9 25468

===============Hence release the size without reboot of the server ================