Thursday, January 10, 2019

Space not released after deletion of file on server

You can follow below steps from root user to clear the space if it gets stuck at kernel level


lsof +L | grep deleted
## it will show the process id, here it gave process id 21099

cd /proc/<process_id>/fd ## go to process id directory like below


cd /proc/21099/fd
l-wx------ 1 root root 64 Apr  1  2016 30 -> /u00/app/grid/diag/asm/+asm/+ASM1/trace/alert_+ASM1.log_bkup1Aug17 (deleted)
## it will show a link with some number to delete file which is still holding the space


> 30 ##then truncate the file like this, mention the number here with >

It will clear the deleted space