On Wed, Jun 18, 2014 at 12:07 PM, Ke-fei Lin <k...@kfei.net> wrote: > 2014-06-18 22:44 GMT+08:00 Gregory Farnum <g...@inktank.com>: >> On Tue, Jun 17, 2014 at 9:46 PM, Ke-fei Lin <k...@kfei.net> wrote: >>> 2014-06-18 1:28 GMT+08:00 Gregory Farnum <g...@inktank.com>: >>>> On Tue, Jun 17, 2014 at 3:22 AM, Ke-fei Lin <k...@kfei.net> wrote: >>>>> Hi list, >>>>> >>>>> How does RADOS check an object and its replica are consistent? Is there >>>>> a checksum in object's metadata or some other mechanisms? Does the >>>>> mechanism depend on OSD's underlying file system? >>>> >>>> It does not check consistency on read. On scrub it compares the local >>>> FS metadata (size et al) and RADOS metadata (object versions and >>>> things); on deep scrub it computes a checksum of each replica and >>>> compares them. >>> Thank you Greg. >>> Let's say if there are an object A and its replica B. On deep scrubbing >>> RADOS >>> find that two objects have different checksums. How does RADOS determine >>> and repair the corrupted object? >> >> You have to explicitly trigger a scrub "repair". Right now, whatever >> the primary has wins; that's obviously suboptimal. (So generally you >> should try and get manually involved with repairs.) > > If I choose XFS as the underlying file system, according to my understanding, > the corrupted object will be detected if and only if a deep scrub > happened. Then it's > possible that an inconsistent object (on primary) being accidentally readed > and > without any error, right?
You are correct. > > So, in such a case, a higher level application logic (or the file > system sitting on > RBD) should take responsibility for data consistency. Am I worried too much? Well, I don't know if you're worried too much, but the scenarios you describe are possible. You need to evaluate what guarantees you need about that. :) -Greg Software Engineer #42 @ http://inktank.com | http://ceph.com _______________________________________________ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com