GlusterFS基础

作者: 石文
时间:2019-01-07


概念

子卷

卷API接口介绍

gluster volume commands

#卷扩容

volume add-brick <VOLNAME> [<stripe|replica> <COUNT> [arbiter <COUNT>]] <NEW-BRICK> … [force] – add brick to volume <VOLNAME>

#卷

volume barrier <VOLNAME> {enable|disable} – Barrier/unbarrier file operations on a volume

#卷

volume clear-locks <VOLNAME> <path> kind {blocked|granted|all}{inode [range]|entry [basename]|posix [range]} – Clear locks held on path

#卷创建

volume create <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT> [arbiter <COUNT>]] [disperse [<COUNT>]] [disperse-data <COUNT>] [redundancy <COUNT>] [transport <tcp|rdma|tcp,rdma>] <NEW-BRICK>?<vg_name>… [force] – create a new volume of specified type with mentioned bricks

#卷删除

volume delete <VOLNAME> – delete volume specified by <VOLNAME>

#其他

volume get <VOLNAME|all> <key|all> – Get the value of the all options or given option for volume <VOLNAME> or all option. gluster volume get all all is to get all global options
#
volume heal <VOLNAME> [enable | disable | full |statistics [heal-count [replica <HOSTNAME:BRICKNAME>]] |info [summary | split-brain] |split-brain {bigger-file <FILE> | latest-mtime <FILE> |source-brick <HOSTNAME:BRICKNAME> [<FILE>]} |granular-entry-heal {enable | disable}] – self-heal commands on volume specified by <VOLNAME>
#
volume help – display help for volume commands

#卷信息

volume info [all|<VOLNAME>] – list information of all volumes

#卷列表

volume list – list all volumes in cluster

其他

#
volume log <VOLNAME> rotate [BRICK] – rotate the log file for corresponding volume/brick
#
volume log rotate <VOLNAME> [BRICK] – rotate the log file for corresponding volume/brick NOTE: This is an old syntax, will be deprecated from next release.

#监视卷

volume profile <VOLNAME> {start|info [peek|incremental [peek]|cumulative|clear]|stop} [nfs] – volume profile operations
#Start Profile
gluster volume profile nfs start
#Stop Profile
gluster volume profile nfs stop
#Info profile
gluster colume profile nfs info

#卷平衡

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

#卷缩容

volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> … <start|stop|status|commit|force> – remove brick from volume <VOLNAME>
volume replace-brick <VOLNAME> <SOURCE-BRICK> <NEW-BRICK> {commit force} – replace-brick operations
volume reset <VOLNAME> [option] [force] – reset all the reconfigured options
volume reset-brick <VOLNAME> <SOURCE-BRICK> {{start} | {<NEW-BRICK> commit}} – reset-brick operations
volume set <VOLNAME> <KEY> <VALUE> – set options for volume <VOLNAME>

#启动卷

volume start <VOLNAME> [force] – start volume specified by <VOLNAME>
volume statedump <VOLNAME> [[nfs|quotad] [all|mem|iobuf|callpool|priv|fd|inode|history]… | [client <hostname:process-id>]] – perform statedump on bricks

#卷状态

volume status [all | <VOLNAME> [nfs|shd|<BRICK>|quotad|tierd]] [detail|clients|mem|inode|fd|callpool|tasks|client-list] – display status of all or specified volume(s)/brick

#停止卷

volume stop <VOLNAME> [force] – stop volume specified by <VOLNAME>

其他

volume sync <HOSTNAME> [all|<VOLNAME>] – sync the volume information from a peer
volume top <VOLNAME> {open|read|write|opendir|readdir|clear} [nfs|brick <brick>] [list-cnt <value>] |
volume top <VOLNAME> {read-perf|write-perf} [bs <size> count <count>] [brick <brick>] [list-cnt <value>] – volume top operations
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值