Hi Ilya,
Thank you for your answer!
On 3/24/22 14:09, Ilya Dryomov wrote:
How can we see whether a lock is exclusive or shared? the rbd lock ls command output looks identical for the two cases.
You can't. The way --exclusive is implemented is the client simply
refuses to release the lock when it gets the request to do so. This
isn't tracked on the OSD side in any way so "rbd lock ls" doesn't have
that information.
if I understand correctly then the lock itself is an OSD "flag" but whether is treated as shared or exclusive that is a local decision of the client. Is this correct?
If my previous understanding is correct then I assume that it would not be impossible to modify the client code so it can be configured on the fly how to handle lock release requests.
My use case would be a HA cluster where a VM is mapping an rbd image, and then it encounters some network issue. An other node of the HA cluster could start the VM and map again the image, but if the networking is fixed on the first VM that would keep using the already mapped image. Here If I could instruct my second VM to treat the lock as exclusive after an automatic failover, then I'm protected against data corruption when the networking of initial VM is fixed. But I assume that a STONITH kind of fencing could also do the job (if it can be implemented).
Kind regards,
Laszlo
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx