安装配置Glusterfs
yum install rpcbind libaio lvm2-devel -y
[root@glusterfs01 ~]# cd Glusterfs-RPM安装包/
[root@glusterfs01 Glusterfs-RPM安装包]# yum install glusterfs-*.rpm -y
或者分开装:
分区过程忽略
[root@glusterfs01 ~]# mkdir /brick1 /brick2 #创建挂载目录
[root@glusterfs01 ~]# mount /dev/sdb1 /brick1
[root@glusterfs01 ~]# mount /dev/sdc1 /brick2
vim /etc/fastb或者/etc/rc.local
[root@glusterfs01 ~]# /etc/init.d/glusterd start
以上三个节点相同操作
添加其他节点:
[root@glusterfs01 ~]# gluster peer probe server2 #添加其他两台加入集群,只需要在一个节点操作
[root@glusterfs01 ~]# gluster peer probe server3
[root@glusterfs01 ~]# gluster peer status #同时在其他节点查看
[root@glusterfs01 ~]# gluster volume create testvo1 server1:/brick1/b1 #创建一个分布式卷,b1目录会自动创建,先使用一个节点,为后面扩展做准备
[root@glusterfs03 ~]# gluster volume start testvo1
[root@glusterfs03 ~]# gluster volume status
[root@glusterfs03 ~]# gluster volume info
[root@glusterfs01 b1]# gluster volume status
[root@fluster-client ~]# mount -t glusterfs server1:/testvo1 /mnt
[root@glusterfs01 ~]# gluster volume add-brick testvo1 server2:/brick1/b2 server3:/brick1/b3 #testvo1卷添加另外两个节点
[root@glusterfs01 ~]# gluster volume info
[root@fluster-client aa]# df -h #客户端查看扩展前后挂载目录的大小
客户端在测试添加一些数据到挂目录,看看节点上是否会有数据,已经分配是否均匀
[root@glusterfs01 hehe]# gluster volume remove-brick testvo1 server3:/brick1/b3 #删除一个节点
Removing brick(s) can result in data loss. Do you want to Continue? (y/n) y
[root@glusterfs01 hehe]# gluster volume info
[root@fluster-client aa]# df -h #客户端查看删除前后挂载目录的大小
[root@glusterfs01 hehe]# gluster volume rebalance testvo1 start #做数据的负载均衡
[root@glusterfs03 hehe]# rm -rf /brick1/b3/ #将之前的删除节点加入卷,需要先删除之前的数据目录
[root@glusterfs03 hehe]# gluster volume add-brick testvo1 server3:/brick1/b3
[root@glusterfs01 test]# gluster volume rebalance testvo1 start #添加删除节点应当都需要做数据负载均衡
[root@fluster-client ~]# umount /mnt/ #客户端卸载挂载点
[root@glusterfs01 test]# gluster volume stop testvo1
[root@glusterfs01 test]# gluster volume delete testvo1
[root@glusterfs01 brick1]# gluster volume create testov1 replica server1:/brick1/b1 server2:/brick1/b2
[root@glusterfs01 brick1]# gluster volume start testov1
[root@glusterfs01 brick1]# gluster volume info #查看Type 属性
[root@fluster-client ~]# mount -t glusterfs server1:/testov1 /mnt #客户端挂载,查看挂载目录大小
[root@fluster-client ~]# df -h #进入挂点添加一些数据,查看数据是否在两个节点中一致
[root@glusterfs03 vols]# rm -rf /var/lib/glusterd/vols/testov1/ #删除节点三的卷信息(没个节点卷信息都是一致的,即使数据不一致)
[root@glusterfs03 vols]# gluster volume sync server2 all #从节点2恢复卷信息
[root@glusterfs03 vols]# ll #刚刚被删除的内容有恢复了
[root@glusterfs01 b1]# gluster volume set testov1 auth.allow 192.168..* #允许访问(仅做IP访问控制,客户端已挂载需要重新挂载生效)
[root@glusterfs01 b1]# gluster volume set testov1 auth.reject 10.1..* #禁止访问,重新allow即可恢复被禁止的IP
[root@glusterfs01 b1]# gluster volume create dhtvol server1:/brick1/dht
[root@glusterfs01 b1]# gluster volume start dhtvol
[root@glusterfs01 b1]# gluster volume info dhtvol
[root@fluster-client mnt]# mount -t glusterfs server1:/dhtvol /media/ #客户端挂载
[root@fluster-client mnt]# df -h
[root@glusterfs01 b1]# gluster volume add-brick dhtvol server2:/brick1/dht #扩展卷的容量
安装配置Glusterfs的更多相关文章
- 2.GlusterFS 安装配置
2.1 GlusterFS 安装前的准备 服务器规划:(vmware 实验) 操作系统 IP 主机名 数据盘(2 块) CentOS 6.8 x86_64 10.1.0.151 mystorage1 ...
- glusterfs安装配置
目标: 原有的k8s的集群磁盘容量不够,数据迁移无法完成,数据迁移是物理机无法由于采购磁盘流程过程,申请虚拟机搭建glusterfs做分布式存储 磁盘规划: # 查看盘符 $ lsblk # 然后创建 ...
- Docker: 安装配置入门[二]
一.安装配置启动 1.环境 [root@docker1 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@d ...
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- Hive on Spark安装配置详解(都是坑啊)
个人主页:http://www.linbingdong.com 简书地址:http://www.jianshu.com/p/a7f75b868568 简介 本文主要记录如何安装配置Hive on Sp ...
- ADFS3.0与SharePoint2013安装配置(原创)
现在越来越多的企业使用ADFS作为单点登录,我希望今天的内容能帮助大家了解如何配置ADFS和SharePoint 2013.安装配置SharePoint2013这块就不做具体描述了,今天主要讲一下怎么 ...
- Hadoop的学习--安装配置与使用
安装配置 系统:Ubuntu14.04 java:1.7.0_75 相关资料 官网 下载地址 官网文档 安装 我们需要关闭掉防火墙,命令如下: sudo ufw disable 下载2.6.5的版本, ...
- redis的安装配置
主要讲下redis的安装配置,以及以服务的方式启动redis 1.下载最新版本的redis-3.0.7 到http://redis.io/download中下载最新版的redis-3.0.7 下载后 ...
- Windows环境下的NodeJS+NPM+Bower安装配置
npm作为一个NodeJS的模块管理,之前我由于没有系统地看资料所以导致安装配置模块的时候走了一大段弯路,所以现在很有必要列出来记录下.我们要先配置npm的全局模块的存放路径以及cache的路径,例如 ...
随机推荐
- react 实现路由按需加载
import() 方法: async.js 文件内容: import React from 'react'; // import "babel-polyfill"; //compo ...
- yaml,json,ini这三种格式用来做配置文件优缺点
适合人类编写:ini > toml > yaml > json > xml > plist可以存储的数据复杂度:xml > yaml > toml ~ jso ...
- dockerfile创建php容器(安装memcached、redis、gd、xdebug扩展)
dockerfile创建php容器(含有memcached.redis.gd.xdebug扩展) 代码如下: FROM php:7.2-fpm COPY redis-3.1.6.tgz /home/r ...
- linux centos6 yum 安装lamp
centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...
- docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley
1. docker 启动image错误 docker: Error response from daemon: driver failed programming external connectiv ...
- Tomcat设置UTF-8字符
进入tomat路径 vim conf/server.xml
- Java消息机制 ActiveMQ入门实例
转载自:http://www.cnblogs.com/wyh3721/p/5917316.html 1.下载ActiveMQ 去官方网站下载:http://activemq.apache.org/ ...
- DOM 讲解
DOM,全称documention,文档意思 ,就是把整个html文档当成一个对象来操作,里面有很多方法,如getElementByid(),getElementByid().innerText(); ...
- 在 ServiceModel 客户端配置部分中,找不到引用协定“IpsBarcode.ScanService”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。
一个类库引用了web service A,用另一个EXE做承载时,访问这个web service A时就提示:“在 ServiceModel 客户端配置部分中,找不到引用协定“IpsBarcode.S ...
- CentOS 7.4 初次手记:第三章 CentOS基础了解
第三章 CentOS基础了解... 36 第一节 语言编码.终端... 36 I 查看语言编码... 36 II Tty?.pts/?. 36 第二节 bash/sh command. 38 I 查找 ...