Hello all,
Searching with different keywords revealed an old thread on this topic:
https://ceph-users.ceph.narkive.com/Cf6KMstn/rbd-exclusive-lock-feature-not-exclusive
Jason Dillaman explains there that:
" It's exclusive in that only a single client can write to an image at a time, but
it's not exclusive in that it prevents other clients from cooperatively requesting the
exclusive lock when they have an outstanding write request."
If we want to prevent that possibility of "cooperative" operation, then we can
add the --exclusive flag to the map operation.
Kind regards,
Laszlo
On 3/23/22 23:18, Budai Laszlo wrote:
Hello all!
I am facing the following issue with ceph RBD: I can pap the image on multiple
hosts.
After I map on the first host I can see its lock on the image. After that I was
expecting the map to fail on the second node, but actually it didn't. The
second node was able to map the image and take over the lock.
How is this possible? What am I missing?
Here are the commands and their results:
First node:
- initially the image is not mapped:
root@compute1:~# rbd status testimg
Watchers: none
root@compute1:~# rbd lock ls testimg
root@compute1:~#
- Map the image on the first node and check the status again:
root@compute1:~# rbd map testimg
/dev/rbd0
root@compute1:~# rbd status testimg
Watchers:
watcher=10.10.10.52:0/3566317141 client.27430 cookie=18446462598732840961
root@compute1:~# rbd lock ls testimg
There is 1 exclusive lock on this image.
Locker ID Address
client.27430 auto 18446462598732840961 10.10.10.52:0/3566317141
root@compute1:~#
Next I am trying to map on the second node:
- map the image on the second node
root@controller1:~# rbd map testimg
/dev/rbd0
root@controller1:~# rbd status testimg
Watchers:
watcher=10.10.10.52:0/3566317141 client.27430 cookie=18446462598732840961
watcher=10.10.10.51:0/2813741573 client.27469 cookie=18446462598732840961
root@controller1:~# rbd lock ls testimg
There is 1 exclusive lock on this image.
Locker ID Address
client.27469 auto 18446462598732840961 10.10.10.51:0/2813741573
root@controller1:~#
root@compute1:~# ceph versions
{
"mon": {
"ceph version 16.2.7 (dd0603118f56ab514f133c8d2e3adfc983942503) pacific
(stable)": 3
},
"mgr": {
"ceph version 16.2.7 (dd0603118f56ab514f133c8d2e3adfc983942503) pacific
(stable)": 2
},
"osd": {
"ceph version 16.2.7 (dd0603118f56ab514f133c8d2e3adfc983942503) pacific
(stable)": 4
},
"mds": {
"ceph version 16.2.7 (dd0603118f56ab514f133c8d2e3adfc983942503) pacific
(stable)": 2
},
"overall": {
"ceph version 16.2.7 (dd0603118f56ab514f133c8d2e3adfc983942503) pacific
(stable)": 11
}
}
root@compute1:~# rbd -v
ceph version 16.2.6 (ee28fb57e47e9f88813e24bbf4c14496ca299d31) pacific (stable)
root@compute1:~# uname -r
5.4.0-90-generic
What am I doing wrong?
Thank you,
Laszlo
_______________________________________________
ceph-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]