gluster副本三配置down两个可写

gluster副本三配置down两个可写

需求

默认做了控制,副本三down两个就阻止写了,这个可以通过参数控制

参数调整

副本三,关闭两个可写

1
2
3
4
gluster volume set testvolume cluster.quorum-type fixed
gluster volume set testvolume cluster.quorum-count 1
gluster volume set testvolume cluster.quorum-reads yes
gluster volume set testvolume network.ping-timeout 10

副本二,关闭一个可写

1
2
3
gluster volume set testvolume cluster.quorum-count 1
gluster volume set testvolume cluster.quorum-reads yes
gluster volume set testvolume network.ping-timeout 10

上面的区别是,副本3默认把cluster.quorum-type设置为auto了

参考资料

Arbiter volumes and quorum options in gluster