drbd主备集群脑裂处理过程
2022-12-25 本文已影响0人
阿乐_822e
NFS00与NFS01使用drbd+keepalved构建双机主备drbd集群
这天巡视时发现同步失败了
[root@CDM-NFS01 szdc]# drbdadm status
r1 role:Primary
volume:1 disk:UpToDate
CDM-NFS00 connection:StandAlone
[root@CDM-NFS00 szdc]# drbdadm status
r1 role:Secondary
volume:1 disk:UpToDate
CDM-NFS01 connection:StandAlone
两台机器都处在StandAlone状态,此时判断一下是否处在脑裂状态
[root@CDM-NFS01 szdc]# grep dropping /var/log/message
Split-Brain detected but unresolved, dropping connection!
故障处理过程:
# NFS00是备机,r1是资源名称
[root@CDM-NFS00 szdc]# drbdadm connect --discard-my-data r1
# NFS01是主机,重连一下资源
[root@CDM-NFS01 szdc]# drbdadm connect r1
# 两台机都恢复了
[root@CDM-NFS01 szdc]# drbdadm status
r1 role:Primary
volume:1 disk:UpToDate
CDM-NFS00 role:Secondary
volume:1 peer-disk:UpToDate
[root@CDM-NFS00 szdc]# drbdadm status
r1 role:Secondary
volume:1 disk:UpToDate
CDM-NFS01 role:Primary
volume:1 peer-disk:UpToDate
···