分布式glusterfs文件式存储管理之五:distributed-replica 分布式复制卷


1 分布式复制卷:在卷中的复制卷上分发文件。可以在需要扩展存储和高可靠性至关重要的环境中使用分布式复制卷。分布式复制卷还可在大多数环境中提供改进的读取性能。结合distributed和replica的优点,HA+可扩容。

创建语法:

#gluster volume create [replica ] [transport tcp | rdma | tcp,rdma]

例子:

# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4

 

     4个存储分为两个组,这两个组按照distributed模式随机。但在组内的两个存储会按replica模式镜像复制。结合了distributed与replica的优点:可以扩容,也有HA特性

  示例: # gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4   服务端: # gluster volume create gfs3 replica 2 transport tcp gfs01:/data/ gfs02:/data/ gfs03:/data/ gfs04:/data/ force 注:4台机器分两个复制组,每组两台,组内默认分布式。经过测试:9.0版本后和复制卷Replicated效果相同   # gluster volume start gfs3 # gluster volume info gfs3   客户端: # mount.glusterfs gfs01:gfs3 /data  # df -Th