GFID mismatch is something that can occur on nodes running GlusterFS, particularly after a split-brain or similar incident.
The symptoms of a GFID mismatch are I/O errors for certain files within the Gluster filesystem, and/or question marks in the output of ls
. Ultimately, though within Glusters logs you'll find Gfid mismatch detected
.
The technically correct way to resolve GFID mismatch is to compare mtimes for each affected GFID in order to identify which node has the most recent copy.
However, where a lot of file are affected, this may not be possible due to the time/effort required - particularly if there's a reasonable certainty that the files themselves don't differ between the nodes
This snippet provides a script which will pull affected GFIDs from the Gluster logs, resolve those GFIDs back to a path and then move that path. It should be run on all but one of your Gluster nodes
Read more…