1、Distributed分布卷 分发文件到所有的brick当中,特点是单个文件不进行条带话,整个文件在一个brick当中,不同的文件分布在不同的brick当中
创建分布卷
# gluster volume create test-volume server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
Creation of test-volume has been successful
Please start the volume to access data.
2、Replicated复制卷 跨越brick进行复制,在需要高可用性和可靠性的环境中使用,类似于raid1
# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2
Creation of test-volume has been successful
Please start the volume to access data.
一个复制卷中的多个brick不能存在于一台主机,就是说一个节点只能包含复制卷中的一个brick
gluster volume create replica 4 server1:/brick1 server1:/brick2 server2:/brick3 server4:/brick4
以上这种情况将不能创建,因为第一个复制关系在同一个服务器上,将会产生单点故障,如果你真想这样做,请在命令最后用force选项 强制执行
3、Striped 条带卷
和raid0一样,单个文件被分散到多个brick中,而分布卷是整个文件在一个brick中,多个文件在不同的brick中。
# gluster volume create test-volume stripe 2 transport tcp server1:/exp1 server2:/exp2
Creation of test-volume has been successful
Please start the volume to access data. stripe 后面是几,那么就必须有几个brick,stripe2说明单个文件被拆分到两个brick当中
4、Distributed Striped 分布式条带卷
单个文件分布于多个brick中,多个文件被分布到多个brick中
# gluster volume create test-volume stripe 4 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7 server8:/exp8
Creation of test-volume has been successful
Please start the volume to access data.
# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
Creation of test-volume has been successful
Please start the volume to access data.
分布式复制卷的brick顺序决定了文件分布的位置,一般来说,先是两个brick形成一个复制关系,然后两个复制关系形成分布
6、Distributed Striped Replicated Volumes分布条带复制卷(只对MapReduce的工作负载支持)
分布式条带复制卷,提供了很好的性能,并且提供了安全性,在高并发环境下非常有用
brick的数量应该是条带和复制的整数倍
# gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7 server8:/exp8
Creation of test-volume has been successful
Please start the volume to access data.
7、 Striped Replicated Volumes条带复制卷(只对MapReduce的工作负载支持)
在高并发,及大文件的情况下非常有用,并且有安全性
# gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
Creation of test-volume has been successful
Please start the volume to access data.