rook / rook

Storage Orchestration for Kubernetes
https://rook.io
Apache License 2.0
12.32k stars 2.69k forks source link

Ceph occupies space and is not released #10391

Closed liwh1111 closed 2 years ago

liwh1111 commented 2 years ago

The capacity of CEPH has been increasing. Although some contents in PVC have been deleted, the capacity of CEPH has not decreased. May I ask how to deal with this?

Some ways to deal with it online:

  1. Specify discard parameters when mounting the file system, for example, "mount -t ext4 -o discard device mountpoint".

  2. "fstrim -v mountpoint"

Have excuse me what good solution?

Madhu-1 commented 2 years ago

Try https://rook.io/docs/rook/v1.9/Storage-Configuration/Ceph-CSI/ceph-csi-drivers/#csi-addons-operation to reclaim the space for rbd PVC.

Madhu-1 commented 2 years ago

discard will have performance issues. fstrim can be automated with csi-addons-operator.

liwh1111 commented 2 years ago

Ok, let me see. Thank you very much

voarsh2 commented 2 years ago

discard will have performance issues. fstrim can be automated with csi-addons-operator.

From this link, https://rook.io/docs/rook/v1.9/Storage-Configuration/Ceph-CSI/ceph-csi-drivers/#csi-addons-operation, I see it only mentions one target PVC per cron job. I'd like it to be done for all PVC's. I have 60+. Would be painful to set this up for all one them individually? Any ideas?

Madhu-1 commented 2 years ago

see it only mentions one target PVC per cron job. I'd like it to be done for all PVC's. I have 60+. Would be painful to set this up for al

Please try annotation way of reclaiming the space https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.5.0/docs/reclaimspace.md#annotating-perstentvolumeclaims

luckydogxf commented 3 months ago

I run into the same issue. Neither fstrim --all -v nor csi-addons-operator works. That's pretty weird.