[Gluster-devel] Question on choosing source of replica to heal with AFR

Zhang Huan zhhuan at gmail.com
Fri Feb 28 15:09:01 UTC 2014


On Fri, Feb 28, 2014 at 6:28 PM, Ravishankar N <ravishankar at redhat.com>wrote:

>    My suggestion is to eliminate the zero-byte file from heal source even
> if is marked as a source. If the underlying filesystem finds some
> corruption (by scrubbing daemon after checking data checksum), it could
> truncate it to 0 and let glusterfs to do the healing job.
>
> If there is underlying FS corruption and we need to make gluster aware of
> it, then something like bit rot detection would be the way to go. You can
> find more information about some work in progress on the gluster website/
> mailing list archives:
>
> http://www.gluster.org/community/documentation/index.php/Arch/BitRot_Detection
> http://lists.nongnu.org/archive/html/gluster-devel/2014-01/msg00209.html
> https://lists.gnu.org/archive/html/gluster-devel/2014-01/msg00006.html
>
> -Ravi
>
>
​Thanks for your material. I agree with the point from the discussion that
glusterfs should make good use of checksum capability of the underlying
filesystem (such as btrfs), for both simplicity and efficiency.

   Here is several cases of analysis in my mind.
> 1. If this corrupted file is marked as the only source, then there is no
> correct replica in the filesystem (actually all are fools), just pick any
> one as the source to heal is OK;
> 2. If the corrupted file is one of the potential sources, eliminate this
> one should keep healing in the right direction without further corrupting
> other correct replicas.
> 3. If the corrupted file is not marked as a source, some other replica
> will be chosen as a source and this file will be overwritten with correct
> data.
> 4. If there is no one is marked as clean by attribute, it is quite
> unlikely this file is chosen as a source as its size is 0. Even it is
> chosen as a source, there is no further corruption of file content after
> heal.
>
> ​On the other hand, I think this might be a fix/improvment for the current
status, for both adding further check to the underlying corruption and a
simple way of underlying filesystem to tell glusterfs it has corruption in
some file.


Zhang Huan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140228/e2457c7d/attachment-0001.html>


More information about the Gluster-devel mailing list