Removing a GlusterFS geo-replication session is useful when retiring a secondary site, switching to a new target volume, or cleaning up a failed replication pairing. Deleting the session prevents further synchronization attempts and removes the session entry from management commands.

GlusterFS geo-replication runs an asynchronous file-level sync from a primary volume to a secondary volume using gsyncd over SSH between clusters. Each session is identified by the primary volume name and a secondary target in the format user@host::volume, tracked as session metadata on the primary cluster.

Deleting a session removes only the replication configuration and tracking state, leaving data on both volumes untouched. Replicated files on the secondary remain as-is, and any geo-replication SSH user/key setup on the secondary is typically left behind for manual cleanup. Use the reset-sync-time option only when the next session creation must force a full resync from scratch.

Steps to delete a GlusterFS geo-replication session:

  1. List current geo-replication sessions to confirm the exact primary and secondary pair.
    $ sudo gluster volume geo-replication status
    MASTER VOL   SLAVE                                          STATUS
    gvol-primary geoaccount@snode1.example.com::gvol-secondary  Active
  2. Stop the geo-replication session to terminate any active synchronization workers.
    $ sudo gluster volume geo-replication gvol-primary geoaccount@snode1.example.com::gvol-secondary stop
    geo-replication: stop: success

    Stopping a session halts gsyncd for that pairing without removing any data.

  3. Delete the geo-replication session from a node in the primary cluster.
    $ sudo gluster volume geo-replication gvol-primary geoaccount@snode1.example.com::gvol-secondary delete
    geo-replication: delete: success

    Use either the normal delete or the reset-sync-time delete variant, not both.

  4. Delete the session with a full reset when a fresh sync is required on the next session creation.
    $ sudo gluster volume geo-replication gvol-primary geoaccount@snode1.example.com::gvol-secondary delete reset-sync-time
    geo-replication: delete: success

    Resetting sync time forces a full resync if the session is recreated.

  5. Verify the session no longer appears in the geo-replication session list.
    $ sudo gluster volume geo-replication status
    No active geo-replication sessions found.