krbd exclusive-lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

There's something I don't understand about the exclusive-lock feature.

I created an image:

$ ssh host-3
Container Linux by CoreOS stable (1298.6.0)
Update Strategy: No Reboots
host-3 ~ # uname -a
Linux host-3 4.9.9-coreos-r1 #1 SMP Tue Mar 14 21:09:42 UTC 2017 x86_64 Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz GenuineIntel GNU/Linux
host-3 ~ # rbd create test-xlock --size=1024 --image-feature exclusive-lock
host-3 ~ # rbd feature enable test-xlock exclusive-lock
rbd: failed to update image features: (22) Invalid argument2017-03-21 10:16:50.911598 7f6975ff0100 -1 librbd: one or more requested features are already enabled

I mapped it

host-3 ~ # rbd map --options lock_on_read test-xlock
/dev/rbd0

I also could map it from another host (disappointment started here):

host-2 ~ # rbd map --options lock_on_read test-xlock
/dev/rbd9

I can read from both host:

host-2 ~ # dd if=/dev/rbd9 of=/dev/null
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.61844 s, 232 MB/s

host-3 ~ # dd if=/dev/rbd0 of=/dev/null
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.33527 s, 322 MB/s

And also write:

host-3 ~ # dd if=/dev/urandom of=/dev/rbd0 bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0153388 s, 68.4 MB/s

host-2 ~ # dd if=/dev/urandom of=/dev/rbd9 bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0312396 s, 33.6 MB/s

Isn't exclusive-lock supposed to forbid at least concurrent writes?

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux