DEBUG.WIKI
IPPeak:从目标地区访问网页,住宅代理、SEO 监测、广告验证
阿里云;从建站到云上业务;云服务器 · 数据库 · 对象存储;查看产品 →
搬瓦工;先看线路,再选 VPS;CN2 GIA · 对应线路套餐;查看线路 →

解决 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

触发根因

  1. 配置了 cluster.quorum-type auto 或 server-quorum-type server 强仲裁机制;
  2. 离线或失联的存储 Brick 数量超过半数,剩余存活节点无法达成法定人数(Quorum);
  3. 卷自动切换至只读保护模式以防范脑裂与数据篡改。

解决步骤

检查各 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,业务写入无缝继续。