[Gluster-users] ?==?utf-8?q? Help with reconnecting a faulty brick

Daniel Berteaud daniel at firewall-services.com
Fri Nov 17 10:11:10 UTC 2017

Le Jeudi, Novembre 16, 2017 13:07 CET, Ravishankar N <ravishankar at redhat.com> a écrit: 
> On 11/16/2017 12:54 PM, Daniel Berteaud wrote:
> > Any way in this situation to check which file will be healed from 
> > which brick before reconnecting ? Using some getfattr tricks ?
> Yes, there are afr xattrs that determine the heal direction for each 
> file. The good copy will have non-zero trusted.afr* xattrs that blame 
> the bad one and heal will happen from good to bad.  If both bricks have 
> attrs blaming the other, then the file is in split-brain.


So, say I have a file with this on the correct node
# file: mnt/bricks/vmstore/prod/bilbao_sys.qcow2

And this on the bad one

# file: mnt/bricks/vmstore/prod/bilbao_sys.qcow2

I can guarantee Gluster will heal from the correct one to the bad. And in case of both having a non nul afr, I can manually (using setfattr) set the afr attribute to a null value before reconnecting the faulty brick, and it'll heal from the correct one.

And for files which have been deleted/renamed/created on the correct node while the bad one was offline, how are those handled ? For example, I have

/mnt/bricks/vmstore/prod/contis_sys.qcow2 ont btoh bricks. But, on the correct one, the file was deleted and recreated while the bad one was offline. So they haven't the same gfid now. How does gluster handle this ?

Sorry for all those questions, I'm just a bit nervous :-)

Daniel Berteaud
Société de Services en Logiciels Libres
Tel : 05 56 64 15 32
Visio: https://vroom.fws.fr/dani
Web : http://www.firewall-services.com

More information about the Gluster-users mailing list