# gluster peer detach [server]
一、建立 GlusterFS Replicated卷
[root@cnsz22VLK5966 ~] #
[root@cnsz22VLK5967 ~]# mkdir /data/brick1/gv0
# gluster volume create gv0 replica 2 OS-01:/data/brick1/gv0 OS-02:/data/brick1/gv0
# gluster volume start gv0
查看存储卷状态:
# gluster volume info
二、创建 Distributed逻辑卷
# gluster volume create gv1 OS-01:/data/brick1/gv1 OS-02:/data/brick1/gv1
# gluster volume info
# gluster volume start gv1
三、创建 Striped逻辑卷
# gluster volume create gv2 stripe 2 transport tcp OS-01:/data/brick1/gv2 OS-02:/data/brick1/gv2
# gluster volume info
# gluster volume start gv2
四、 停止GlusterFS逻辑卷或删除GlusterFS逻辑卷
# gluster volume stop gv0
# gluster volume delete gv0
五、 存储块brick相关的逻辑卷管理
在gv0卷中增加一个存储块server3:/data/brick1/gv0 :
# gluster volume add-brick gv0 [server3]:/data/brick1/gv0
# gluster volume rebalance gv0 start
删除Brick:
# gluster volume remove-brick gv0 [server3]:/data/brick1/gv0
# gluster volume rebalance gv0 start
测试:
#mount -t glusterfs OS-01:/gv0/mnt
#for i in `seq -w 1 100`; do cp -rp /var/log/messages /mnt/copy-test-$i; done
检查一下挂接点:
#ls -lA /mnt | wc -l