Search code examples
glusterfs

I have a question regarding GlusterFS disk usage


I'm a developer using GlusterFS. First of all, I apologize for using a translation tool as I'm not very comfortable with English. I have some questions regarding GlusterFS. Currently, I'm using GlusterFS version 6.5. I have some inquiries about disk usage related to bricks. I checked the volume information with the "sudo gluster vol info" command, and it looks like this:

Volume Name: gfs
Type: Distributed-Replicate
(...)
Number of Bricks: 2 x 3 = 6
Bricks:
Brick1: gluster1:/gluster/bricks/1/brick   ## 97%
Brick2: gluster2:/gluster/bricks/2/brick    ## 97%
Brick3: gluster3:/gluster/bricks/3/brick    ## 97%
Brick4: gluster1:/gluster/bricks/2-1/brick    ## it's ok
Brick5: gluster2:/gluster/bricks/2-2/brick    ## it's ok
Brick6: gluster3:/gluster/bricks/2-3/brick     ## it's ok
(...)

There are 2 X 3 bricks in total. Initially, I used one disk on each of the first three servers, totaling three disks. Later, I added three disks to each server using the "add-brick" command to increase capacity. Currently, each server has two disks. However, the disk usage of the initially added bricks has reached 97%. Even though there is still free capacity in the three bricks added later, I am concerned. Is it okay if the usage of the initially added three bricks reaches 100%? I tried to find documentation, but it only seems to cover adding bricks, and it's hard to determine if there will be any issues when the usage of the existing bricks reaches 100%. I hope that once the usage of the initial three bricks reaches 100%, they will be read-only, and write operations will naturally occur on the three bricks added later. Will it work like that? If anyone has knowledge about this, I would appreciate your advice. Thank you.


Solution

  • After adding new set of bricks, rebalancing the volume is required. Rebalance should be run manually. Rebalance will fix the layout in the new bricks and redistribute the files both distribute groups.

    First run the fix-layout rebalance to fix the layout and it also start creating the new files in the newly added bricks. Then run the rebalance when the load on the volume is less.

    Fix layout rebalance

    gluster volume rebalance gfs fix-layout start
    

    Full rebalance

    gluster volume rebalance gfs start
    

    And check the status using,

    gluster volume rebalance gfs status
    

    Check the below link for more details https://docs.gluster.org/en/latest/Administrator-Guide/Managing-Volumes/