GlusterFS分布式文件系统常用命令

7年前 (2017-10-02) gtj linux, WEB应用 0评论 已收录 1004℃
gluster peer probe host|ip  ##添加设备 
gluster peer status         #查看除本机外的其他设备状态  
gluster peer detach host|ip #如果希望将某设备从存储池中删除  
gluster volume create mamm-volume node1:/media node2:/media node3:/media ...  #分布卷
gluster volume create mamm-volume repl 2  node1:/media node2:/media #复本卷
gluster volume create mamm-volume stripe 2 node1:/media node2:/media #分片卷
gluster volume create dr-volume repl 2 node1:/exp1 node2:/exp2 node3:/exp3 node4:/exp4  
gluster volume create ds-volume stripe 2 node1:/exp1 node1:/exp2 [&] node2:/exp3 node2:/exp4  ##条带卷
gluster volume create test-volume stripe 2 replica 2 server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4  #exp1和exp2组成复本卷,exp3和exp4组成复本卷,两个复本卷组成分片卷
gluster volume stripe 2 replica 2 server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7 server8:/exp8  #exp1 exp2 exp3 exp4组成一个分布卷,exp1和exp2组成一个stripe卷,exp3和exp4组成另一个stripe卷,1和2,3和4互为复本卷

启/停/删除卷

gluster volume start mamm-volume  
gluster volume stop mamm-volume  
gluster volume delete mamm-volume  

扩展收缩卷

gluster volume add-brick mamm-volume [strip|repli <count>] brick1...  
gluster volume remove-brick mamm-volume [repl <count>] brick1...  

迁移卷

gluster volume replace-brick mamm-volume old-brick new-brick [start|pause|abort|status|commit]  
#迁移需要完成一系列的事务,假如我们准备将mamm卷中的brick3替换为brick5  

gluster volume replace-brick mamm-volume node3:/exp3 node5:/exp5 start  #启动迁移过程  

gluster volume replace-brick mamm-volume node3:/exp3 node5:/exp5 pause  #暂停迁移过程  
  
gluster volume replace-brick mamm-volume node3:/exp3 node5:/exp5 abort  #中止迁移过程
 
gluster volume replace-brick mamm-volume node3:/exp3 node5:/exp5 status  #查看迁移状态 

gluster volume replace-brick mamm-volume node3:/exp3 node5:/exp5 commit  #迁移完成后提交完成  

均衡卷

gluster volume rebalane mamm-volume start|stop|status  

触发副本自愈

gluster volume heal mamm-volume #只修复有问题的文件  
gluster volume heal mamm-volume full #修复所有文件  
gluster volume heal mamm-volume info#查看自愈详情  
gluster volume heal mamm-volume info healed|heal-failed|split-brain

选项配置

gluster volume set mamm-volume key value  

性能profile

gluster volume profile mamm-vol start    
gluster volume profile info   
gluster volume profile mamm-vol stop  

卷状态查看

gluster volume status [all|volname] [detail|clients|mem|fd|inode|callpoll]  



待完善....

博主

这货来去如风,什么鬼都没留下!!!

相关推荐

嗨、骚年、快来消灭0回复。

×
订阅图标按钮
Less is more!!!