# /etc/init.d/glusterd start

# /etc/init.d/glusterd stop

# /etc/init.d/glusterd status

2.       开机自动启动glusterd服务

# chkconfig glusterd on # Red Hat

# update-rc.d glusterd defaults # Debian

# echo "glusterd" >>/etc/rc.local # Others

3.       查看配置信息

# cat /etc/rc.local

4.       为存储池添加/移除服务器节点

在其中一个节点上操作即可:

# gluster peer probe

# gluster peer detach

注意,移除节点时,需要提前将该节点上的Brick移除。

查看所有节点的基本状态(显示的时候不包括本节点):

# gluster peer status

5.       挂载分区

# mount -t ext4 /dev/sdd1 /mnt/brick1

6.       创建/启动/停止/删除卷

# gluster volume create [stripe | replica ] [transport [tcp | rdma | tcp,rdma]] ...

# gluster volume start

# gluster volume stop

# gluster volume delete

注意,删除卷的前提是先停止卷。

7.       客户端以glusterfs方式挂载

# mount -t glusterfs :/

对于OpenStack,计算和控制节点都要挂载/var/lib/nova/instances,控制节点还要挂载/var/lib/glance/images。

8.       查看卷信息

列出集群中的所有卷:

# gluster volume list

查看集群中的卷信息:

# gluster volume info [all]

查看集群中的卷状态:

# gluster volume status [all]

# gluster volume status [detail| clients | mem | inode | fd]

查看本节点的文件系统信息:

# df -h []

查看本节点的磁盘信息:

# fdisk -l

9.       配置卷

# gluster volume set

10.    扩展卷

# gluster volume add-brick

注意,如果是复制卷或者条带卷,则每次添加的Brick数必须是replica或者stripe的整数倍。

11.    收缩卷

先将数据迁移到其它可用的Brick,迁移结束后才将该Brick移除:

# gluster volume remove-brick start

在执行了start之后,可以使用status命令查看移除进度:

# gluster volume remove-brick status

不进行数据迁移,直接删除该Brick:

# gluster volume remove-brick commit

注意,如果是复制卷或者条带卷,则每次移除的Brick数必须是replica或者stripe的整数倍。

12.    迁移卷

使用start命令开始进行迁移:

# gluster volume replace-brick start

在数据迁移过程中,可以使用pause命令暂停迁移:

# gluster volume replace-brick pause

在数据迁移过程中,可以使用abort命令终止迁移:

# gluster volume replace-brick abort

在数据迁移过程中,可以使用status命令查看迁移进度:

# gluster volume replace-brick status

在数据迁移结束后,执行commit命令来进行Brick替换:

# gluster volume replace-brick commit

13.    重新均衡卷

不迁移数据:

# gluster volume rebalance lay-outstart

# gluster volume rebalance start

# gluster volume rebalance startforce

# gluster volume rebalance status

# gluster volume rebalance stop

14.    系统扩展维护

开启/关闭系统配额:

# gluster volume quota enable | disable

设置目录配额:

# gluster volume quota limit-usage

查看配额:

# gluster volume quota list [

]

地域复制(geo-replication):

# gluster volume geo-replication start | status | stop

IO信息查看:

# gluster volume profile start | info | stop

Top监控:

Top命令允许你查看Brick的性能,例如:read,write, file open calls, file read calls, file write calls, directory opencalls, and directory real calls。所有的查看都可以设置 top数,默认100。

查看打开的 fd:

# gluster volume top open[brick ] [list-cnt ]

其中,open可以替换为read, write, opendir, readdir等。

查看每个 Brick 的读性能:

# gluster volume top read-perf [bs count ] [brick ] [list-cnt ]

其中,read-perf可以替换为write-perf等。

GlusterFS常用命令小结的更多相关文章

  1. [转]MySQL数据库备份和还原的常用命令小结

    MySQL数据库备份和还原的常用命令小结,学习mysql的朋友可以参考下: 备份MySQL数据库的命令 mysqldump -hhostname -uusername -ppassword datab ...

  2. [转帖]Windows批处理(cmd/bat)常用命令小结

    Windows批处理(cmd/bat)常用命令小结 非常值得学习的文档 先放这里 有时间做实验, 转载自:“趣IT”微信公共号 前言 批处理文件(batch file)包含一系列 DOS命令,通常用于 ...

  3. pip 常用命令小结

    pip 常用命令小结 pip这个工具我们经常会用到,毕竟python 是一门以第三方库庞大而著名的编程语言,所以我们总会用pip 安装一些依赖库,当然这只是pip 最常用的一个命令,下面就来介绍一下 ...

  4. Linux 常用命令小结

    学习脚本几天了,总结下linux debian下脚本常用命令. Linux    1.添加删除账户 useradd / userdel    2.修改"张三"密码 passwd 张 ...

  5. Linux 最常用命令小结

    1. 文件共享 1).将windows 系统下的文件夹共享到linux的方法: 安装filezilla,设置连接linux 服务器.将文件上传. 2).mRemote 机器连接管理 2. 文件管理命令 ...

  6. Windows批处理(cmd/bat)常用命令小结

    转载自:“趣IT”微信公共号 前言 批处理文件(batch file)包含一系列 DOS命令,通常用于自动执行重复性任务.用户只需双击批处理文件便可执行任务,而无需重复输入相同指令.编写批处理文件非常 ...

  7. MySQL 数据库常用命令小结

    MySQL 数据库常用命令 1.MySQL常用命令 create database name; 创建数据库 use databasename; 选择数据库 drop database name 直接删 ...

  8. Linux调试工具strace和gdb常用命令小结

    strace和gdb是Linux环境下的两个常用调试工具,这里是个人在使用过程中对这两个工具常用参数的总结,留作日后查看使用. strace调试工具 strace工具用于跟踪进程执行时的系统调用和所接 ...

  9. GlusterFS常用命令

    1.启动/关闭/查看glusterd服务 # /etc/init.d/glusterd start # /etc/init.d/glusterd stop # /etc/init.d/glusterd ...

随机推荐

  1. 获取客户端IP地址经纬度所在城市

    <?php $getIp=$_SERVER["REMOTE_ADDR"]; echo 'IP:',$getIp; echo '<br/>'; $content = ...

  2. Asp.Net MVC2.0 Url 路由入门---实例篇

    本篇主要讲述Routing组件的作用,以及举几个实例来学习Asp.Net MVC2.0 Url路由技术. 接着上一篇开始讲,我们在Global.asax中注册一条路由后,我们的请求是怎么转到相应的Vi ...

  3. Faster-R-CNN编译使用及相应问题解决

    1.首先opencv是需要安装的,我用的ubuntu14.04,opencv3.0,具体安装教程可以参考网上很多,不想多提. 2.安装几个依赖包:cython,python-opencv和easydi ...

  4. oracle索引

    1,建立索引 create index goods_num on goods (num) tablespace data; 2,查看表上索引 select * from USER_INDEXES wh ...

  5. underscore.js中的节流函数debounce及trottle

    函数节流   throttle and debounce的相关总结及想法 一开始函数节流的使用场景是:放止一个按钮多次点击多次触发一个功能函数,所以做了一个clearTimeout setTimeou ...

  6. 手机浏览器无法获取COOKIE的原因

    手机浏览器上无法使用cookie,肯能是 1. 浏览器禁用 COOKIE ,这个简单开启即可. 2. 可能是手机所在时区有问题,将COOKIE有效期设置更长时间测试下,在更改时区

  7. 【1】ubuntu 安装docker

    官方支持安装docker的Ubuntu版本: ubuntu trusty 14.04(LTS) (64位) ubuntu precise 12.04(LTS) (64位) ubuntu raring ...

  8. Makefile:130: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

    修改了snmp里面的包Makefile,出现了如下问题: Makefile:130: *** missing separator (did you mean TAB instead of 8 spac ...

  9. UILabel 的属性设置

    .设置字体样式(加粗) label.font = [UIFont boldSystemFontOfSize:30]; 6.设置字体类型 label.font = [UIFont fontWithNam ...

  10. 如何成为出色的IT项目经理:成功的五个关键因素

    “出色”的IT 项目经理的定义不是一成不变的.随着经济和商业因素的改变,项目经理的角色进行调整以适应新的需求,迎接新的挑战. 除了一般的困惑之外,还有一种看法就是,在组织中,不同的人对于项目经理的看法 ...