Actions
Bug #64800
closed
RR
RR
unable to remove RBD image when OSD is full and trash object is not already created in the image's pool
Bug #64800:
unable to remove RBD image when OSD is full and trash object is not already created in the image's pool
Due date:
% Done:
0%
Source:
Backport:
quincy,reef,squid
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v19.3.0-2249-gf319358771
Released In:
v20.2.0~2869
Upkeep Timestamp:
2026-08-28T01:38:15+00:00
Description
In a vstart cluster, created a RBD image, wrote data to it, configured set-full-ratio to make the OSDs full. Failed to remove the image using the CLI
$ rbd create --size 2048 data/img1
$ sudo ./bin/rbd device map data/img1
$ sudo fio --name=fiotest --filename=/dev/rbd0 --rw=randrw --bs=4M --direct=1 --ioengine=libaio --size=2G
$ sudo ./bin/rbd device unmap /dev/rbd0
$ ceph -s
cluster:
id: 1b6d031f-c462-4236-b88b-7486b1f40603
health: HEALTH_WARN
3 pool(s) have no replicas configured
services:
mon: 1 daemons, quorum a (age 64m)
mgr: x(active, since 64m)
osd: 1 osds: 1 up (since 63m), 1 in (since 64m)
data:
pools: 3 pools, 65 pgs
objects: 277 objects, 1.1 GiB
usage: 2.1 GiB used, 99 GiB / 101 GiB avail
pgs: 65 active+clean
io:
client: 112 KiB/s rd, 90 MiB/s wr, 134 op/s rd, 67 op/s wr
$ # configure OSD setting to make the OSD full
$ ceph osd set-nearfull-ratio 0.017
$ ceph osd set-backfillfull-ratio 0.018
$ ceph osd set-full-ratio 0.020
$ ceph -s
cluster:
id: 1b6d031f-c462-4236-b88b-7486b1f40603
health: HEALTH_ERR
1 full osd(s)
3 pool(s) full
3 pool(s) have no replicas configured
services:
mon: 1 daemons, quorum a (age 73m)
mgr: x(active, since 73m)
osd: 1 osds: 1 up (since 72m), 1 in (since 72m)
data:
pools: 3 pools, 65 pgs
objects: 277 objects, 1.1 GiB
usage: 2.1 GiB used, 99 GiB / 101 GiB avail
pgs: 65 active+clean
$ rbd rm data/img1 --debug_rbd=10
...
2024-03-07T16:34:26.927-0500 7f19c6ffd6c0 10 librbd::ImageCtx: 0x55b8470abab0 ~ImageCtx
2024-03-07T16:34:26.927-0500 7f19ff594580 10 librbd::trash::MoveRequest: 0x7f19c80029f0 trash_add:
2024-03-07T16:34:26.928-0500 7f19e3fff6c0 10 librbd::trash::MoveRequest: 0x7f19c80029f0 handle_trash_add: r=-28
2024-03-07T16:34:26.928-0500 7f19e3fff6c0 -1 librbd::trash::MoveRequest: 0x7f19c80029f0 handle_trash_add: failed to add image to trash: (28) No space left on device
2024-03-07T16:34:26.928-0500 7f19e3fff6c0 10 librbd::trash::MoveRequest: 0x7f19c80029f0 finish: r=-28
2024-03-07T16:34:26.929-0500 7f19ff594580 -1 librbd::api::Trash: move: error setting trash image state: (2) No such file or directory
Removing image: 0% complete...failed.
rbd: delete error: (2) No such file or directory
This issue is also documented as a FIXME in test/librbd/test_librbd.cc,
TEST_F(TestLibRBD, RemoveFullTry)
{
...
// FIXME: this is a workaround for rbd_trash object being created
// on the first remove -- pre-create it to avoid bumping into quota
ASSERT_EQ(0, create_image(ioctx, image_name.c_str(), 0, &order));
ASSERT_EQ(0, rbd_remove(ioctx, image_name.c_str()));
remove_full_try(ioctx, image_name, pool_name);
rados_ioctx_destroy(ioctx);
}
https://github.com/ceph/ceph/blob/v19.0.0/src/test/librbd/test_librbd.cc#L2193
RR Updated by Ramana Raja over 2 years ago
- Description updated (diff)
RR Updated by Ramana Raja over 2 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 56310
ID Updated by Ilya Dryomov over 2 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to quincy,reef,squid
UB Updated by Upkeep Bot over 2 years ago
- Copied to Backport #66115: quincy: unable to remove RBD image when OSD is full and trash object is not already created in the image's pool added
UB Updated by Upkeep Bot over 2 years ago
- Copied to Backport #66116: reef: unable to remove RBD image when OSD is full and trash object is not already created in the image's pool added
UB Updated by Upkeep Bot over 2 years ago
- Copied to Backport #66117: squid: unable to remove RBD image when OSD is full and trash object is not already created in the image's pool added
ID Updated by Ilya Dryomov over 2 years ago
- Related to Bug #66886: [test][krbd] krbd_data_pool.sh needs to account for rbd_trash object added
UB Updated by Upkeep Bot over 2 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".
UB Updated by Upkeep Bot over 2 years ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot over 1 year ago
- Merge Commit set to f319358771888734055e19f9680a63fa1e2208a6
- Fixed In set to v19.3.0-2249-gf3193587718
- Upkeep Timestamp set to 2025-07-11T15:09:13+00:00
UB Updated by Upkeep Bot over 1 year ago
- Fixed In changed from v19.3.0-2249-gf3193587718 to v19.3.0-2249-gf319358771
- Upkeep Timestamp changed from 2025-07-11T15:09:13+00:00 to 2025-07-14T23:10:26+00:00
UB Updated by Upkeep Bot about 1 year ago
- Released In set to v20.2.0~2869
- Upkeep Timestamp changed from 2025-07-14T23:10:26+00:00 to 2025-11-01T01:34:05+00:00
UB Updated by Upkeep Bot 3 months ago
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2025-11-01T01:34:05+00:00 to 2026-08-28T01:38:15+00:00
Actions