CentOS Stream 8
Sponsored Link

GlusterFS 7 : Add Nodes (Bricks)2021/04/02

 
Add Nodes (Bricks) to existing Cluster.
                                  |
+----------------------+          |          +----------------------+
| [GlusterFS Server#1] |10.0.0.51 | 10.0.0.52| [GlusterFS Server#2] |
|   node01.srv.world   +----------+----------+   node02.srv.world   |
|                      |          |          |                      |
+----------------------+          |          +----------------------+
           ⇑                      |                      ⇑
     file1, file3 ...             |               file2, file4 ...
                                  |
+----------------------+          |
| [GlusterFS Server#3] |10.0.0.53 |
|   node03.srv.world   +----------+
|                      |
+----------------------+

[1]
Install GlusterFS to a New Node, refer to here, and then Create a directory for GlusterFS volume on the same Path with other Nodes.
[2] Add a New Node to existing Cluster on a node. (OK on any existing node)
# probe new node

[root@node01 ~]#
gluster peer probe node03

peer probe: success.
# confirm status

[root@node01 ~]#
gluster peer status

Number of Peers: 2

Hostname: node02
Uuid: 7f2113e9-b709-4970-bb8d-4b410454f287
State: Peer in Cluster (Connected)

Hostname: node03
Uuid: 76e27164-dd4f-4bc0-987f-934db2cf625c
State: Peer in Cluster (Connected)

# confirm existing volume

[root@node01 ~]#
gluster volume info


Volume Name: vol_distributed
Type: Distribute
Volume ID: e7edbced-dd22-483f-9984-ab0cf8d6b5d1
Status: Started
Snapshot Count: 0
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: node01:/glusterfs/distributed
Brick2: node02:/glusterfs/distributed
Options Reconfigured:
features.quota-deem-statfs: on
features.inode-quota: on
features.quota: on
transport.address-family: inet
storage.fips-mode-rchecksum: on
nfs.disable: on

# add new node

[root@node01 ~]#
gluster volume add-brick vol_distributed node03:/glusterfs/distributed

volume add-brick: success
# confirm volume info

[root@node01 ~]#
gluster volume info


Volume Name: vol_distributed
Type: Distribute
Volume ID: e7edbced-dd22-483f-9984-ab0cf8d6b5d1
Status: Started
Snapshot Count: 0
Number of Bricks: 3
Transport-type: tcp
Bricks:
Brick1: node01:/glusterfs/distributed
Brick2: node02:/glusterfs/distributed
Brick3: node03:/glusterfs/distributed
Options Reconfigured:
features.quota-deem-statfs: on
features.inode-quota: on
features.quota: on
transport.address-family: inet
storage.fips-mode-rchecksum: on
nfs.disable: on

# after adding new node, run rebalance volume

[root@node01 ~]#
gluster volume rebalance vol_distributed fix-layout start

volume rebalance: vol_distributed: success: Rebalance on vol_distributed has been started successfully. Use rebalance status command to check status of the rebalance process.
ID: 6775f435-6bc7-41eb-b1e1-45b97a976ab7

# OK if [Status] turns to [completed]

[root@node01 ~]#
gluster volume status

Status of volume: vol_distributed
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick node01:/glusterfs/distributed         49153     0          Y       17998
Brick node02:/glusterfs/distributed         49153     0          Y       2940
Brick node03:/glusterfs/distributed         49152     0          Y       2502
Quota Daemon on localhost                   N/A       N/A        Y       18599
Quota Daemon on node02                      N/A       N/A        Y       3097
Quota Daemon on node03                      N/A       N/A        Y       2525

Task Status of Volume vol_distributed
------------------------------------------------------------------------------
Task                 : Rebalance
ID                   : 6775f435-6bc7-41eb-b1e1-45b97a976ab7
Status               : completed
Matched Content