解决 GlusterFS 报错 Quorum loss Read-only volume 集群仲裁丢失只读修复
排查 GlusterFS 卷在发生网络分区或部分节点离线后拒绝写入,报错 Read-only file system,分析 cluster.quorum-type 与 server-quorum 仲裁机制。
问题现象
GlusterFS 卷在网络微抖动后,客户端所有写入操作报错:
touch: cannot touch '/mnt/gluster/file': Read-only file system
Brick 日志: [afr-common.c:4820:afr_notify] 0-gv0-replicate-0: quorum not met, setting volume to read-only
触发根因
- 配置了
cluster.quorum-type auto或server-quorum-type server强仲裁机制; - 离线或失联的存储 Brick 数量超过半数,剩余存活节点无法达成法定人数(Quorum);
- 卷自动切换至只读保护模式以防范脑裂与数据篡改。
解决步骤
检查各 Brick 节点的物理在线情况
执行命令:
sudo gluster volume status gv0
定位当前不在线的 Brick IP 与盘符。
排除网络隔离使失联节点重新加入通信网络
重启故障节点上的 gluster 进程并确认连通:
sudo systemctl restart glusterd
若确认安全需临时放宽仲裁策略以恢复生产
临时调整仲裁模式(慎用):
sudo gluster volume set gv0 cluster.quorum-type fixed
sudo gluster volume set gv0 cluster.quorum-count 1
验证确认
恢复存活仲裁节点后:
卷状态从 Read-only 自动解锁为 Read-Write,业务写入无缝继续。


