GlusterFs - 无法移除和添加砖块

GlusterFs - 无法移除和添加砖块

我有一个由 3 个节点组成的 GlusterFS (3.12.1) 集群。

步骤 1: 删除一个节点(node2)

来自节点1

# gluster volume remove-brick swarm-data replica 2 node2:/glusterfs/swarm-data force  
# gluster peer detach node2  

步骤2:清除节点

来自节点2

# rm -rf /glusterfs/swarm-data  
# mkdir /glusterfs/swarm-data

和维护工作

步骤3:重新添加节点

来自节点1

# gluster peer probe node2  
# gluster volume add-brick swarm-data replica 3 node2:/glusterfs/swarm-data force
volume add-brick: failed: Commit failed on node2. Please check log
file for details.

显示日志:

failed to get the port number for remote subvolume. Please run 'gluster volume status' on server to see if brick process is running.
E [MSGID: 108006] [afr-common.c:5001:__afr_handle_child_down_event] 0-swarm-data-replicate-0: All subvolumes are down. Going offline until atleast one of them comes back up.

下一个:

# gluster volume status
Status of volume: swarm-data
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick node1:/glusterfs/swarm
-data                                       49152     0          Y       31216
Brick node3:/glusterfs/swarm
-data                                       49152     0          Y       2373 
Brick node2:/glusterfs/swarm
-data                                       N/A       N/A        N       N/A  
Self-heal Daemon on localhost               N/A       N/A        Y       27293
Self-heal Daemon on node3    N/A       N/A        Y       20268
Self-heal Daemon on node2    N/A       N/A        Y       7568 

Task Status of Volume swarm-data
------------------------------------------------------------------------------
There are no active volume tasks

=> TCP 端口:对于 Node2 不适用!!

下一个:

# gluster volume info swarm-data

Volume Name: swarm-data
Type: Replicate
Volume ID: 0edd8275-8d39-4e95-abc8-9f028c2098a7
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: node1:/glusterfs/swarm-data
Brick2: node3:/glusterfs/swarm-data
Brick3: node2:/glusterfs/swarm-data
Options Reconfigured:
auth.allow: 127.0.0.1
transport.address-family: inet
nfs.disable: on

Node2 已到!但没有数据同步

节点 1 和 3 有端口 49152 正在监听,但节点 2 没有:

netstat -an | grep LISTEN

你能帮助我吗 ?

答案1

检查解析名称(DNS或hosts文件)。检查node2上的glusterd服务是否启动。如果glusterd没有启动,请发布日志。

答案2

我也偶尔遇到过这种情况。您可以尝试稍后重新启动 GlusterFS 服务并再次检查:

systemctl restart glusterd
gluster volume status

相关内容