A GlusterFS replicate volume in split-brain can serve different versions of the same file from different bricks, leading to silent data loss and unpredictable application behavior. Resolving the conflict with the latest-mtime policy forces a single authoritative copy based on the newest modification time so replication can return to a consistent state.

Split-brain is handled by the AFR (Automatic File Replication) layer, which detects diverged replicas and blocks automatic healing until a winner is chosen. The gluster volume heal split-brain resolver works per-path: gluster volume heal <vol> info split-brain lists conflicted paths, and gluster volume heal <vol> split-brain latest-mtime <path> copies the brick with the newest mtime to the other replicas.

The resolution is destructive because non-selected replicas are overwritten during the heal, so confirm the correct file version before applying it. Keep brick clocks synchronized (for example with chronyd or systemd-timesyncd) because a time skew can make the wrong replica appear “newest”. The latest-mtime policy is intended for file split-brain; directory split-brain typically requires a different policy.

Steps to resolve GlusterFS split-brain using latest mtime:

  1. Confirm all replica bricks are online before resolving split-brain.
    $ sudo gluster volume status volume1
    Status of volume: volume1
    Gluster process                             TCP Port  RDMA Port  Online  Pid
    ------------------------------------------------------------------------------
    Brick node1:/srv/gluster/brick1             49152     0          Y       13241
    Brick node2:/srv/gluster/brick2             49153     0          Y       13907
    Self-heal Daemon on node1                   N/A       N/A        Y       14112
    Self-heal Daemon on node2                   N/A       N/A        Y       14203

    Split-brain resolution may not propagate while a brick is offline or disconnected.

  2. Identify split-brain entries in the volume.
    $ sudo gluster volume heal volume1 info split-brain
    Brick node1:/srv/gluster/brick1
    Number of entries in split-brain: 1
    /dir/file1 - Is in split-brain
    
    Brick node2:/srv/gluster/brick2
    Number of entries in split-brain: 1
    /dir/file1 - Is in split-brain

    The listed paths are relative to the volume root and should be reused verbatim in the resolve command.

  3. Resolve the split-brain entry using the latest modified time policy.
    $ sudo gluster volume heal volume1 split-brain latest-mtime /dir/file1
    Split-brain resolved for /dir/file1

    Run once per path shown by the split-brain listing.

    The chosen file version overwrites the other replicas.

  4. Confirm the split-brain list is empty after the resolution.
    $ sudo gluster volume heal volume1 info split-brain
    Brick node1:/srv/gluster/brick1
    Number of entries in split-brain: 0
    
    Brick node2:/srv/gluster/brick2
    Number of entries in split-brain: 0
  5. Check that there is no remaining heal backlog on the volume.
    $ sudo gluster volume heal volume1 info summary
    Brick node1:/srv/gluster/brick1
    Status: Connected
    Number of entries: 0
    
    Brick node2:/srv/gluster/brick2
    Status: Connected
    Number of entries: 0