Bug #12542
radosgw deleted log leaks
0%
Description
The `df` is full, but `du` says no.
I run `lsof +L1` shows
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME radosgw 1219628 root 3w REG 8,3 1238650678 0 1192286 /var/log/ceph/radosgw-20150609 (deleted)
After `service ceph-radosgw restart`, disk usage come back normal.
ceph version 0.94.1
History
#1 Updated by huang jun about 8 years ago
If you delete a file that is opened by a process, then df will not changed because the file's inode wasn't deleted and also it data. If the filename is gone du doesn’t see it in the directory any more.
However since the inode is still in use df sees that the filesystem is still using the space.
#2 Updated by Jifeng Yin about 8 years ago
I know it exactly, but I didn't delete it manually.
There is a same file in gzip format under the same directory, so I think it should be ceph's behavior.
#3 Updated by Jifeng Yin about 8 years ago
Jifeng Yin wrote:
I know it exactly, but I didn't delete it manually.
There is a same file named in '.gz' under the directory, so I think it should be ceph's behavior.
#4 Updated by huang jun about 8 years ago
.gz file is generated by logrotate service, you can find the script in /etc/logrotate.d/ceph
#5 Updated by Jifeng Yin about 8 years ago
Thanks for the info. I see the postrotate only reload ceph service.
It should also reload ceph-radosgw service in my case, or the occupied disk won't be released. Is that correct?
#6 Updated by huang jun about 8 years ago
It rotate all files in .log format in /var/log/ceph/ dir.
but do not reload ceph-radosgw services in postrotate script,
which maybe the reason that df and du looks different.
#7 Updated by Casey Bodley over 3 years ago
- Status changed from New to Closed