(1)创建distribute stripe卷
gluster volume create raid10 stripe 2 192.168.75.129:/opt/raid10-1 192.168.75.129:/opt/raid10-2 192.168.75.129:/opt/raid10-3 192.168.75.129:/opt/raid10-4 192.168.75.129:/opt/raid10-5 192.168.75.129:/opt/raid10-6 192.168.75.129:/opt/raid10-7 192.168.75.129:/opt/raid10-8得到的/etc/glusterd/vols/raid10/raid10-fuse.vol配置文件内容如下:
volume raid10-client-0 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-1 option transport-type tcp end-volume volume raid10-client-1 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-2 option transport-type tcp end-volume volume raid10-client-2 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-3 option transport-type tcp end-volume volume raid10-client-3 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-4 option transport-type tcp end-volume volume raid10-client-4 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-5 option transport-type tcp end-volume volume raid10-client-5 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-6 option transport-type tcp end-volume volume raid10-client-6 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-7 option transport-type tcp end-volume volume raid10-client-7 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-8 option transport-type tcp end-volume volume raid10-stripe-0 type cluster/stripe subvolumes raid10-client-0 raid10-client-1 end-volume volume raid10-stripe-1 type cluster/stripe subvolumes raid10-client-2 raid10-client-3 end-volume volume raid10-stripe-2 type cluster/stripe subvolumes raid10-client-4 raid10-client-5 end-volume volume raid10-stripe-3 type cluster/stripe subvolumes raid10-client-6 raid10-client-7 end-volume volume raid10-dht type cluster/distribute subvolumes raid10-stripe-0 raid10-stripe-1 raid10-stripe-2 raid10-stripe-3 end-volume volume raid10-write-behind type performance/write-behind subvolumes raid10-dht end-volume volume raid10-read-ahead type performance/read-ahead subvolumes raid10-write-behind end-volume volume raid10-io-cache type performance/io-cache subvolumes raid10-read-ahead end-volume volume raid10-quick-read type performance/quick-read subvolumes raid10-io-cache end-volume volume raid10-stat-prefetch type performance/stat-prefetch subvolumes raid10-quick-read end-volume volume raid10 type debug/io-stats option latency-measurement off option count-fop-hits off subvolumes raid10-stat-prefetch end-volume(2) service glusterd stop
(3)编辑/etc/glusterd/vols/raid10/raid10-fuse.vol,修改后内容如下:
volume raid10-client-0 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-1 option transport-type tcp end-volume volume raid10-client-1 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-2 option transport-type tcp end-volume volume raid10-client-2 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-3 option transport-type tcp end-volume volume raid10-client-3 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-4 option transport-type tcp end-volume volume raid10-client-4 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-5 option transport-type tcp end-volume volume raid10-client-5 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-6 option transport-type tcp end-volume volume raid10-client-6 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-7 option transport-type tcp end-volume volume raid10-client-7 type protocol/client option remote-host 192.168.75.129 option remote-subvolume /opt/raid10-8 option transport-type tcp end-volume volume raid10-afr-0 type cluster/replicate subvolumes raid10-client-0 raid10-client-1 end-volume volume raid10-afr-1 type cluster/replicate subvolumes raid10-client-2 raid10-client-3 end-volume volume raid10-afr-2 type cluster/replicate subvolumes raid10-client-4 raid10-client-5 end-volume volume raid10-afr-3 type cluster/replicate subvolumes raid10-client-6 raid10-client-7 end-volume volume raid10-stripe-0 type cluster/stripe subvolumes raid10-afr-0 raid10-afr-1 end-volume volume raid10-stripe-1 type cluster/stripe subvolumes raid10-afr-2 raid10-afr-3 end-volume volume raid10-dht type cluster/distribute subvolumes raid10-stripe-0 raid10-stripe-1 end-volume volume raid10-write-behind type performance/write-behind subvolumes raid10-dht end-volume volume raid10-read-ahead type performance/read-ahead subvolumes raid10-write-behind end-volume volume raid10-io-cache type performance/io-cache subvolumes raid10-read-ahead end-volume volume raid10-quick-read type performance/quick-read subvolumes raid10-io-cache end-volume volume raid10-stat-prefetch type performance/stat-prefetch subvolumes raid10-quick-read end-volume volume raid10 type debug/io-stats option latency-measurement off option count-fop-hits off subvolumes raid10-stat-prefetch end-volume(4) service glusterd start; gluster volume start raid10
Volume Name: raid10 Type: Distributed-Stripe Status: Started Number of Bricks: 4 x 2 = 8 Transport-type: tcp Bricks: Brick1: 192.168.75.129:/opt/raid10-1 Brick2: 192.168.75.129:/opt/raid10-2 Brick3: 192.168.75.129:/opt/raid10-3 Brick4: 192.168.75.129:/opt/raid10-4 Brick5: 192.168.75.129:/opt/raid10-5 Brick6: 192.168.75.129:/opt/raid10-6 Brick7: 192.168.75.129:/opt/raid10-7至此,Glusterfs分布式RAID10卷已经创建好的,开始测试和应用吧!