Tuesday, April 20, 2021

Managing GlusterFS Volumes

Increasing Replicas on Replicated GlusterFS


Let's say existing volume is backed by 2 bricks having a size of 5 GB each

To add 2 more bricks, perform this on 1 node only
gluster volume add-brick my_volume replica 4 node1:/bricks/brick2 node2:/bricks/brick2
"replica 4" means we are increasing the replica count of a file
If we used "replica 2", we will end up in a "distributed-replicated" type of
volume which is not correct if we still want to maintain the volume type as
replicated.

Also, if the sizes of the new bricks are greater then the existing bricks, the
volume size will be the size of the original bricks. The lower size are always
being used so it is better to add bricks with same size of the existing ones.

Expanding a Distributed GlusterFS Volume


1. Perform this on 1 node
   gluster volume add-brick my_volume node1:/brick/brick2
2. The total size of brick(s) will be added on top of the existing size of
   the volume.

Expanding a Replicated GlusterFS Volume


1. Expand the underlying storage on all nodes.
   lvextend -rL +5G /dev/mapper/gluster_vg-gluster_lv
2. The gluster volume size should now be increased by 5G

No comments:

Post a Comment