How to delete ceph/rbd hidden snap

Oct 11, 2021
1
0
6
53
Hello,

We've noticed an old ceph mirror snapshot named "trash" which uses a lot of space. How to delete it ?

Bash:
# rbd snap ls --all rbd/image
SNAPID  NAME         SIZE   PROTECTED  TIMESTAMP                 NAMESPACE
   387  0a8da...     8 TiB             Mon May 20 21:05:01 2024  trash (.mirror.primary...)
</pre>

# rbd snap rm rbd/image@0a8da...
Removing snap: 0% complete...failed.
rbd: failed to remove snapshot: (2) No such file or directory

Snap exists and can be mounted :
Bash:
# rbd device map -p rbd image --snap-id 387 --read-only

Maybe something to edit in the header ?

Bash:
# rados listomapvals rbd_header.xxx
snapshot_0000000000000183
value (191 bytes) :
00000000  08 08 b9 00 00 00 83 01  00 00 00 00 00 00 24 00  |..............$.|
00000010  00 00 30 61 38 64 61 63  31 66 2d 30 38 34 31 2d  |..0a8dac1f-0841-|
...
00000030  36 34 63 39 65 39 00 00  00 00 00 08 00 00 00 00  |64c9e9..........|
00000040  00 00 00 00 00 00 00 01  01 65 00 00 00 02 00 00  |.........e......|
00000050  00 59 00 00 00 2e 6d 69  72 72 6f 72 2e 70 72 69  |.Y....mirror.pri|
00000060  6d 61 72 79 2e 33 39 66  63 37 31 39 33 2d 38 35  |mary.39fc7193-85|
...
000000a0  34 2d 30 63 65 38 64 65  30 30 30 62 31 61 03 00  |4-0ce8de000b1a..|
000000b0  00 00 dd 9e 4b 66 14 0a  89 29 00 00 00 00 00     |....Kf...).....|
000000bf

Any clues about how to unhide and delete this snapshot are welcome.

Thank you !