On Thu, Jul 1, 2021 at 10:50 AM Jan Kasprzak <kas(a)fi.muni.cz> wrote:
Ilya Dryomov wrote:
: On Thu, Jul 1, 2021 at 8:37 AM Jan Kasprzak <kas(a)fi.muni.cz> wrote:
: >
: > # rbd snap unprotect one/one-1312@snap
: > 2021-07-01 08:28:40.747 7f3cb6ffd700 -1 librbd::SnapshotUnprotectRequest: cannot
unprotect: at least 1 child(ren) [68ba8e7bace188] in pool 'one'
: > 2021-07-01 08:28:40.749 7f3cb6ffd700 -1 librbd::SnapshotUnprotectRequest:
encountered error: (16) Device or resource busy
: > 2021-07-01 08:28:40.749 7f3cb6ffd700 -1 librbd::SnapshotUnprotectRequest:
0x56522f10e830 should_complete_error: ret_val=-16
: > rbd: unprotecting snap failed: 2021-07-01 08:28:40.751 7f3cb6ffd700 -1
librbd::SnapshotUnprotectRequest: 0x56522f10e830 should_complete_error: ret_val=-16
: >
: > As far as I can see neither the snapshot nor the RBD image itself is
: > used by a running qemu in my cluster. How can I delete the snapshot
: > or debug the problem further?
:
: There seems to be a clone image that is based on that snapshot.
: "rbd children one/one-1312@snap" should give you its name.
OK, there was a child which did not show up in "rbd children" - the
previously deleted clone. We use the trash feature, so it did not
get deleted altogether, but moved to trash instead. I guess "rbd children"
should be modified to show also images fro trash.
after rbd restore --pool one one-1312-4742-0 I was able to delete
the image using "rbd rm one/one-1312-4742-0", unprotect the snapshot
with "rbd snap unprotect one/one-1312@snap", and finally delete it
with "rbd snap rm one/one-1312@snap".
So my immediate problem is fixed, but it would be nice if "rbd children"
can also display images from trash.
"rbd children -a" does that as noted in my previous reply.
Thanks,
Ilya