10.2. Expanding Volumes

You can expand volumes, as needed, while the trusted storage pool is online and available. For example, you might want to add a brick to a distributed volume, thereby increasing the distribution and adding to the capacity of the Red Hat Storage volume.
Similarly, you might want to add a group of bricks to a distributed replicated volume, increasing the capacity of the Red Hat Storage volume.

Note

When expanding distributed replicated and distributed striped volumes, you need to add a number of bricks that is a multiple of the replica or stripe count. For example, to expand a distributed replicated volume with a replica count of 2, you need to add bricks in multiples of 2 (such as 4, 6, 8, etc.).
To expand a volume
  1. From any server in the trusted storage pool, probe the server to which you want to add the new brick using the following command:
    # gluster peer probe HOSTNAME
    For example:
    # gluster peer probe server4
    Probe successful
  2. Add the brick using the following command:
    # gluster volume add-brick VOLNAME NEW-BRICK
    For example:
    # gluster volume add-brick test-volume server4:/exp4
    Add Brick successful
  3. Check the volume information using the following command:
    # gluster volume info
    The command displays information similar to the following:
    Volume Name: test-volume
    Type: Distribute
    Status: Started
    Number of Bricks: 4
    Bricks:
    Brick1: server1:/exp1
    Brick2: server2:/exp2
    Brick3: server3:/exp3
    Brick4: server4:/exp4
  4. Rebalance the volume to ensure that files are distributed to the new brick.
    You can use the rebalance command as described in Section 10.5, “Rebalancing Volumes”.