It's possible for a write to span one or more blocks -- it just depends on the 
write address/size and the RBD image layout (object size, "fancy" striping, 
etc).  Regardless, however, RBD cannot provide any ordering guarantees when two 
clients are writing to the same image at the same extent.  To safely use two or 
more clients concurrently on the same image you need a clustering filesystem on 
top of RBD (e.g. GFS2) or the application needs to provide its own coordination 
to avoid concurrent writes to the same image extents.  

-- 

Jason Dillaman 


----- Original Message ----- 

> From: "min fang" <[email protected]>
> To: "ceph-users" <[email protected]>
> Sent: Tuesday, April 5, 2016 10:11:10 PM
> Subject: [ceph-users] ceph rbd object write is atomic?

> Hi, as my understanding, ceph rbd image will be divided into multiple objects
> based on LBA address.

> My question here is:

> if two clients write to the same LBA address, such as client A write "aaaa"
> to LBA 0x123456, client B write "bbbb" to the same LBA.

> LBA address and data will only be in an object, not cross two objects.

> Will ceph guarantee object data must be "aaaa" or "bbbb"? "aabb", "bbaa" will
> not happen even in a stripe data layout model?

> thanks.

> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to