[Bugs] [Bug 1700078] New: disablle + reenable of bitrot leads to files marked as bad

bugzilla at redhat.com bugzilla at redhat.com
Mon Apr 15 18:47:34 UTC 2019


https://bugzilla.redhat.com/show_bug.cgi?id=1700078

            Bug ID: 1700078
           Summary: disablle + reenable of bitrot leads to files marked as
                    bad
           Product: GlusterFS
           Version: mainline
            Status: NEW
         Component: bitrot
          Assignee: bugs at gluster.org
          Reporter: rabhat at redhat.com
                CC: bugs at gluster.org
  Target Milestone: ---
    Classification: Community
      Docs Contact: bugs at gluster.org



Description of problem:

Disable and reenable of bit-rot feature on a gluster volume can lead to a
situation where some files are marked as bad (even though they are not
corrupted).

Consider a gluster volume with bit-rot feature enabled and consisting of files
that have been signed with the checksum. Now, disable the feature. The files
still continue to contain the version and signature extended attributes. At
this stage if some files are modified and later bit-rot feature is reenabled,
then those files are which were modified while the feature was off, will be
marked as bad by the scrubber after the feature is reenabled.

This happens because of this reason.

The modification of the file(s), while the feature was off, would not have
resulted in calculation of the checksum of the file and that checksum being
saved as part of the signature xattr. 

And the bit-rot daemon whenever is spawned (either restart or regular start due
to feature enable) does a one shot crawling of the entire volume, where it
skips calculating the checksum of the files (and saving that checksum as part
of signature) if any file contains those xattrs already (assuming their value
should be correct).

So when scrubber does its job, it finds the on disk checksum and the calculated
checksum to be different. This makes scrubber mark such a file as bad.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a gluster volume, start it and mount it
2. Enable bit-rot feature
3. Create a file with some data
4. Wait till the file is properly signed (it takes 2 minutes for proper 
   signature to be saved as an xattr)
5. disable bit-rot
6. Modify the contents of the file.
7. Reenable the bit-rot feature
8. Start on-demand scrubbing.


Actual results:

File is marked as bad even though no corruption has happened due to bit-rot.

Expected results:


Additional info:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are the Docs Contact for the bug.


More information about the Bugs mailing list