0

My SSD-disk on my server is full although du doesn't show it.

df -h|head
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda2       98G   93G     0 100% /

although:

du -xhcs --apparent-size /                                                                                              
35G     /                                                                                                                                                                                                                             
35G     total

I also checked with ncdu -x / which gives also only 35GB

How can I further debug this?

rubo77
  • 28,966
  • That question has been asked literally hundreds of times. See https://unix.stackexchange.com/questions/linked/9612?lq=1 or https://unix.stackexchange.com/questions/linked/120311?lq=1 – Stéphane Chazelas Jan 06 '24 at 22:42

1 Answers1

-1

It seems like it is a large deleted file that is still open somehow:

#lsof|grep deleted|grep nginx/error.log
COMMAND       PID     TID TASKCMD               USER   FD      TYPE             DEVICE    SIZE/OFF       NODE NAME
2x
nginx     1896696                               root    5w      REG              202,2 62868951040    1344848 /var/log/nginx/error.log~ (deleted)
16x
nginx     1896697                           www-data    2w      REG              202,2 62868951040    1344848 /var/log/nginx/error.log~ (deleted)

To free this deleted file restart the process that could have it open in this case

service restart nginx

or see if there is a tail -f process still open on that file in any terminal session (e.g. tmux)

Also check for loop devices with

losetup -a
rubo77
  • 28,966