Skip to contentSkip to conversation

Cleaning up CephFS pool

DISCUSSION Denis Fondras 2 participants 4 messages Nov 6, 2012

lore
Share & tools
lore
#0 lore raw

Hello all,

I noticed that removing files on CephFS doesn't reclaim free space using ceph version 0.52(commit:e48859474c4944d4ff201ddc9f5fd400e8898173)

I created 2 500GB files on CephFS (mounted with ceph-fuse) and then removed them. Now "rados df -p data" shows a 1GB usage :
--8<----------------

pool name       category                 KB      objects       clones 
  degraded      unfound           rd        rd KB           wr        wr KB
data            -                 1048580595       257696            0 
          0           0            0            0       628853   1629192870

--8<----------------

Is there a way to clean it up ? "rados cleanup" needs a prefix I don't know...
Of course, I could "rm" every objects but what if I had other files that I don't want to remove from CephFS ?

Thanks in advance,
Denis

#1 lore raw

Deleting files on CephFS doesn't instantaneously remove the underlying objects because they could still be in use by other clients, and removal takes time proportional to the size of the file. Instead the MDS queues it up to be removed asynchronously. You should see the number of objects counter going down over time.
-Greg

Quoted 25 lines · Denis Fondras

Hello all,

I noticed that removing files on CephFS doesn't reclaim free space using ceph version 0.52(commit:e48859474c4944d4ff201ddc9f5fd400e8898173)

I created 2 500GB files on CephFS (mounted with ceph-fuse) and then removed them. Now "rados df -p data" shows a 1GB usage :
--8<----------------
pool name category KB objects clones
degraded unfound rd rd KB wr wr KB
data - 1048580595 257696 0
0 0 0 0 628853 1629192870
--8<----------------

Is there a way to clean it up ? "rados cleanup" needs a prefix I don't know...
Of course, I could "rm" every objects but what if I had other files that I don't want to remove from CephFS ?

Thanks in advance,
Denis
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · Gregory Farnum

Deleting files on CephFS doesn't instantaneously remove the underlying objects because they could still be in use by other clients, and removal takes time proportional to the size of the file. Instead the MDS queues it up to be removed asynchronously. You should see the number of objects counter going down over time.
-Greg

Thank you for that fast answer Greg.
If I'm the only user, is there a way to speedup this process ?

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 11 lines · Denis Fondras
Quoted 7 lines · Gregory Farnum

Deleting files on CephFS doesn't instantaneously remove the underlying objects because they could still be in use by other clients, and removal takes time proportional to the size of the file. Instead the MDS queues it up to be removed asynchronously. You should see the number of objects counter going down over time.
-Greg

Quoted 2 lines

Thank you for that fast answer Greg.
If I'm the only user, is there a way to speedup this process ?

Hrm, I don't think so. Sorry.
It shouldn't actually take that long though once nobody's got the file open. --
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html