# Recovering when Ceph OSDs are too full to operate

**URL:** <https://community.replicated.com/t/recovering-when-ceph-osds-are-too-full-to-operate/1308>\
**Category:** How do I?\
**Tags:** ceph, rook\
**Created:** [October 9, 2023, 4:16am UTC](https://community.replicated.com/t/recovering-when-ceph-osds-are-too-full-to-operate/1308 "2023-10-09T04:16:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dexter\_Yan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/dexter_yan/32/661_2.png) [@Dexter\_Yan](https://community.replicated.com/u/Dexter_Yan)\
**Post date:** [October 9, 2023, 4:16am UTC](https://community.replicated.com/t/recovering-when-ceph-osds-are-too-full-to-operate/1308/1 "2023-10-09T04:16:53Z")

</div>

If you’re working with Rook Ceph and face issues related to backfill, this guide will walk you through the steps to resolve them.

You can see when this is an issue because Ceph will report that it is unhealthy, with messages like `OSD_BACKFILLFULL: 1 backfillfull osd(s)` and/or ` OSD_NEARFULL: 2 nearfull osd(s)`.

Note that by default, Ceph will switch to readonly when the OSD devices are 85% full.

**1. Access the Rook Ceph Tools:**

kubectl command

```auto
kubectl exec -ti rook-ceph-tools-xxxxxxx -n rook-ceph bash

```

**2. Check the Current Full-Ratio Rate:**  
Use the following command to check the current values:

```auto
ceph osd dump | grep -i full

```

You might see output similar to this:

```auto
full_ratio 0.95
backfillfull_ratio 0.9
nearfull_ratio 0.85

```

Make a note of these ratios as you’ll need to revert to these values later.

**3. Temporarily Increase the Full Ratio:**  
To temporarily allow more space, modify the full ratios:

```auto
ceph osd set-full-ratio 0.97
ceph osd set-nearfull-ratio 0.95
ceph osd set-backfillfull-ratio 0.97

```

**4. Confirm OSDs are not Full:**  
Ensure that all of the OSDs are not in a full state:

```auto
ceph osd status

```

**5. Check Pool Usage:**

To determine which pool is consuming the most space, you can use:

```auto
ceph df

```

or

```auto
rados df

```

Depending on the results, you can decide if cleanup is necessary.

**6. Cleanup (if needed):**  
Here’s an example command to purge logs which might free up some space:

```auto
rados purge rook-ceph-store.rgw.log --yes-i-really-really-mean-it

```

**7. Restart csi-rbdplugin or csi-cephfsplugin (if needed):**

```auto
If you see error like GRPC error: rpc error: code = Aborted desc = an operation with the given Volume ID 0001-0009-rook-ceph-0000000000000001-8d0ba728-0e17-11eb-a680-ce6eecc894de already exists.

The issue mostly exists in ceph cluster or network connectivity. If the issue is
in Provisioning the PVC Restarting the Provisioner pods help(for CephFS issue
restart `csi-cephfsplugin-provisioner-xxxxxx` CephFS Provisioner. For RBD, restart
`csi-rbdplugin-provisioner-xxxxxx` pod. If the issue is in mounting the PVC,
restarting the csi-rbdplugin-xxxxx for RBD issue and csi-cephfsplugin-xxxxx pod
for CephFS issue helps sometimes not always.

```

**8. Reset the Full Ratios to their Original Values:**  
Once you’ve addressed the space issue, revert the full ratios to their original values:

```auto
ceph osd set-full-ratio [previous_record]
ceph osd set-nearfull-ratio [previous_record]
ceph osd set-backfillfull-ratio [previous_record]

```

By following these steps, you should be able to solve the backfill issues in Rook Ceph.

See [the upstream docs](https://docs.ceph.com/en/quincy/rados/troubleshooting/troubleshooting-osd/#no-free-drive-space) for more information.
