gluster常用的命令使用

1、向gluster存储池注册存储计算机

gluster peer probe hostname(IP) 

2、从gluster存储池移除存储计算机

gluster peer detach hostname(IP)

3、查看gluster存储池存储计算机信息

gluster pool list或gluster peer status

4、gluster创建存储卷

gluster volume create NEW-VOLNAME [stripe COUNT | replica COUNT]
[transport [tcp | rdma | tcp,rdma]] NEW-BRICK1 NEW-BRICK2 NEW-BRICK3...
分布式:
gluster volume create NEW-VOLNAME [transport [tcp | rdma | tcp,rdma]]
NEW-BRICK...
For example, to create a distributed volume with four storage servers using tcp:
# gluster volume create test-volume server1:/exp1 server2:/exp2 server3:/exp3 server4:/
exp4
复制式:
gluster volume create NEW-VOLNAME [replica COUNT] [transport [tcp |
rdma | tcp,rdma]] NEW-BRICK...
For example, to create a replicated volume with two storage servers:
# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2
条带式:
gluster volume create NEW-VOLNAME [stripe COUNT] [transport [tcp |
rdma | tcp,rdma]] NEW-BRICK...
For example, to create a striped volume across two storage servers:
# gluster volume create test-volume stripe 2 transport tcp server1:/exp1 server2:/exp2
分布条带式:
gluster volume create NEW-VOLNAME [stripe COUNT] [transport [tcp |
rdma | tcp,rdma]] NEW-BRICK...
For example, to create a distributed striped volume across eight storage servers:
# gluster volume create test-volume stripe 4 transport tcp server1:/exp1 server2:/exp2
分布复制式:
gluster volume create NEW-VOLNAME [replica COUNT] [transport [tcp |
rdma | tcp,rdma]] NEW-BRICK...
For example, four node distributed (replicated) volume with a two-way mirror:
# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2
For example, to create a six node distributed (replicated) volume with a two-way mirror:
# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2
 
三合一:
Create a distributed striped replicated volume using the following command:
# gluster volume create NEW-VOLNAME [stripe COUNT] [replica COUNT]
[transport [tcp | rdma | tcp,rdma]] NEW-BRICK...
For example, to create a distributed replicated striped volume across eight storage servers:
# gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1
 
复制条带:
gluster volume create NEW-VOLNAME [stripe COUNT] [replica COUNT]
[transport [tcp | rdma | tcp,rdma]] NEW-BRICK...
For example, to create a striped replicated volume across four storage servers:
# gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1
gluster volume create test-volume stripe 3 replica 2 transport tcp server1:/exp1


5、查看gluster存储卷信息

gluster volume info或gluster volume NEW-VOLUME status


6、启动gluster存储卷

gluster volume start NEW-VOLUME


7、停止gluster存储卷

gluster volume stop NEW-VOLUME


8、删除gluster存储卷

gluster volume delete NEW-VOLUME


9、向gluster存储卷中添加存储位置

gluster volume add-brick NEW-VOLUME [<stripe|replica> <COUNT>] <NEW-BRICK> ... [force] - add brick to volume <VOLNAME>

10、删除gluster存储卷中指定存储位置

volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... [start|stop|status|commit|force] - remove brick from volume <VOLNAME>


11、rebalance存储卷数据存储

volume rebalance <VOLNAME> [fix-layout] {start|stop|status} [force] - rebalance operations