Bug #12542
closed
radosgw deleted log leaks
Added by Jifeng Yin almost 9 years ago.
Updated about 4 years ago.
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
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.
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.
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.
.gz file is generated by logrotate service, you can find the script in /etc/logrotate.d/ceph
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?
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.
- Status changed from New to Closed
Also available in: Atom
PDF