Ceph: find who's mapping a RBD device
Curious? Wanna know who has a RBD device mapped?
W Update: Since Ceph Infernalis there is a RBD command for that
$ rbd status vms/2fcf7648-27d6-406f-bc92-b3f9d5ebe5f5_disk
W Important note: this method only works with the Emperor version of Ceph and above.
Grab the image information:
$ rbd info boot
Then list the objects part of the pool and get the image header. Eventually run:
$ rados -p rbd listwatchers boot.rbd
As we can see the machine:
192.168.251.102 has the device