Rebalancing a GlusterFS volume redistributes files across bricks after capacity changes so storage and IO stay evenly spread instead of concentrating on a subset of bricks.

GlusterFS stores per-directory layout metadata that determines which brick should hold a given file, and that layout can change after brick additions or removals. The gluster volume rebalance operation updates layouts and migrates existing data in the background while the volume remains online, with progress reported through rebalance status output.

Rebalance can increase disk and network load, so schedule it during low-usage windows and avoid making additional brick layout changes while it is running. Brick or peer issues can prolong the job or lead to failures, so confirm cluster health before starting and monitor status until completion.

Steps to rebalance a GlusterFS volume:

  1. List available volumes to confirm the target volume name.
    $ sudo gluster volume list
    volume1
  2. Confirm the volume is started before rebalancing.
    $ sudo gluster volume info volume1
    Volume Name: volume1
    Status: Started
  3. Confirm the bricks are online before starting rebalance.
    $ sudo gluster volume status volume1
    Status of volume: volume1
    Gluster process                             TCP Port  RDMA Port  Online  Pid
    ------------------------------------------------------------------------------
    Brick node1:/bricks/brick1                  49152     0          Y       27431
    Brick node2:/bricks/brick1                  49152     0          Y       26804

    Offline bricks can cause rebalance failures and extend recovery time.

  4. Start a rebalance on the volume.
    $ sudo gluster volume rebalance volume1 start
    volume rebalance: volume1: success: Rebalance on volume volume1 has been started successfully

    Rebalance can reduce client performance while files are migrated.

  5. Check rebalance status until it reports completion.
    $ sudo gluster volume rebalance volume1 status
                                       Node Rebalanced-files          size       scanned      failures      status
    ---------------------------------------------------------------------------------------------
                                   node1          128                 8.2GB         412           0      completed
                                   node2          126                 8.0GB         409           0      completed

    Rebalance is complete when each node shows completed and failures remain at 0.