存储节点部署示例环境,仅供参考

主机名 IP 系统
gfs01 10.10.10.13 Ubuntu 16.04.3 LTS
gfs02 10.10.10.14 Ubuntu 16.04.3 LTS

一、GlusterFS的安装

1.1 格式化磁盘、创建目录并挂载

# 查看可用磁盘
fdisk -l
# 分区并格式化
mkfs.xfs /dev/vdb
mkdir -p /data
echo "/dev/vdb1 /data xfs defaults 1 2" >>/etc/fstab
# 挂载
mount -a

gfs01和gfs02节点都需要执行如上操作。

# 确定/data挂载
df -h | grep data

1.2 安装启动glusterfs服务

apt-get -y install glusterfs-server
systemctl start glusterfs-server
systemctl enable glusterfs-server
systemctl status glusterfs-server

1.4 配置信任池

仅在其中1个节点执行操作即可

[root@gfs01 ~]# gluster peer probe 10.10.10.14
peer probe: success.

在gfs02上验证

[root@gfs02 ~]# gluster peer status
Number of Peers: 1 Hostname: 10.10.10.13
Uuid: ba10c6e2-2266-40a4-aaa2-0d26ea2d8786
State: Peer in Cluster (Connected)

1.5 创建卷

# 节点gfs01,gfs02都需执行
mkdir -p /data/glusterfs # 在gfs01执行创建卷操作
[root@gfs01 ~]# gluster volume create data replica 2 10.10.10.14:/data/glusterfs 10.10.10.13:/data/glusterfs volume create: data: success: please start the volume to access data # 在gfs02 查看卷信息
[root@gfs02 ~]# gluster volume info
Volume Name: data
Type: Replicate
Volume ID: 25ba3181-6a7e-412f-98b3-2f3aa317281c
Status: Created
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.10.10.14:/data/glusterfs
Brick2: 10.10.10.13:/data/glusterfs
Options Reconfigured:
performance.readdir-ahead: on # 启动卷
[root@gfs02 ~]# gluster volume start data
volume start: data: success

1.6 简单挂载测试

# 挂载
[root@gfs01 ~]# mount -t glusterfs 10.10.10.14:/data /mnt
[root@gfs02 ~]# mount -t glusterfs 10.10.10.13:/data /mnt # gfs02 写文件
touch /mnt/{1..10}.txt # gfs01 验证是否生成{1..10}.txt
ls /mnt/ | wc -l

到此完成GlusterFS的部署

二. 通过ansible安装GlusterFS

# 下载源码
git clone https://github.com/goodrain/rainbond-glusterfs.git
cd rainbond-glusterfs
# 编辑 inventory/hosts 文件
all下为所有节点信息
gfscluster下为gfscluster server端(存储节点)
rainbondcluster下为gfscluster client端(即管理节点,计算节点)
# 执行安装
./setup.sh

需要注意disk_volume_device_1值为实际GlusterFS存储使用的磁盘(fdisk -l)

Ubuntu对接GlusterFS的更多相关文章

  1. Ubuntu: GlusterFS+HBase安装教程

    HBase通常安装在Hadoop HDFS上,但也能够安装在其它实现了Hadoop文件接口的分布式文件系统上.如KFS. glusterfs是一个集群文件系统可扩展到几peta-bytes. 它集合了 ...

  2. Ubuntu 搭建 GlusterFS 过程笔记

    https://download.gluster.org/pub/gluster/ #要安装的东西 ---- ``` apt install -y build-essential gcc make c ...

  3. k8s 对接glusterfs存储

    service 与 endpoint 是通过namespace相同,name相同,相互关联的 创建endpoint [root@k8s-master glusterfs]# cat glusterfs ...

  4. CentOS对接GlusterFS

    存储节点部署示例环境,仅供参考 主机名 IP 系统 gfs01 10.10.10.13 CentOS 7.4.1708 gfs02 10.10.10.14 CentOS 7.4.1708 一.Glus ...

  5. ubuntu安装glusterFS

    以2台服务器为例: node1: 172.18.1.10 node2: 172.18.1.20 1) 修改主机名,修改hosts文件添加IP地址映射 hostname node1/node2vim / ...

  6. GlusterFS分布式存储系统复制集更换故障Brick操作记录

    场景: GlusterFS 3节点的复制集,由于磁盘故障,其中一个复制集需要重装系统,所以需要重装glusterfs并将该节点加入glusterfs集群 一. 安装GlusterFS 首先在重装系统节 ...

  7. Ubuntu Server 12.04下部署glusterfs

    1.安装环境 Linux:Ubuntuserver 12.04.1 LTS 64bit 2台 分布式文件系统:Gluster 测试环境:一台作文件服务器端(192.168.56.133),一台作客户端 ...

  8. 【分布式存储】GlusterFS failing to mount at boot with Ubuntu 14.04

    GlusterFS failing to mount at boot with Ubuntu 14.04   Previously I asked about mounting GlusterFS a ...

  9. ubuntu glusterfs 配置调试

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqMAAADpCAIAAACfoakcAAAgAElEQVR4nO2d2XMjSX7f8c+sQ4GwHY

随机推荐

  1. python 利用cvxopt线性规划

    from cvxopt import matrix, solvers ################################################################# ...

  2. PHP简单的计算位数的函数

    一个简单的PHP计算位数的函数: 1 <?php 2 //一个简单的计算字符串有长度的函数 3 #开始定义函数 4 function count_digit($number){ 5 $count ...

  3. Android 安全研究 hook 神器frida学习(一)

    在进行安卓安全研究时,hook技术是不可或缺的,常用的有Xposed:Java层的HOOK框架,由于要修改Zgote进程,需要Root,体验过Xposed,整个过程还是很繁琐的,并且无法hook,na ...

  4. hive集群模式安装

    hadoop3.2.0 完全分布式安装 hive-3.1.1 #解压缩tar -zxvf /usr/local/soft/apache-hive-3.1.1-bin.tar.gz -C /usr/lo ...

  5. rocketmq部署架构

    1 技术架构 RocketMQ架构上主要分为四部分,如上图所示: Producer:消息发布的角色,支持分布式集群方式部署.Producer通过MQ的负载均衡模块选择相应的Broker集群队列进行消息 ...

  6. RocetMQ搭建攻略和问题解决之道

    最近有在尝试给项目加入消息中间件服务,首先想到了鼎鼎大名的RocketMQ.RocketMQ是一款高性能的.分布式消息中间件,由阿里开源.它提供了丰富的消息拉取方式,能够处理上亿级的海量数据,甚至在阿 ...

  7. Eclipse导入外部jar包的步骤

    (1)首先在项目的跟目录下先建一个名字为lib的文件夹,通常外部导入的jar包都放在这个文件夹下面. (2)将需要用到的jar包复制到lib文件夹下面. (3)在项目中导入jar包 右键项目,选择Bu ...

  8. mysql 创建[序列],功能类似于oracle的序列

    参考自菜鸟教程 https://www.runoob.com/mysql/mysql-using-sequences.html 使用函数创建自增序列管理表(批量使用自增表,设置初始值,自增幅度) 第一 ...

  9. git版本回滚

    本地版本回滚 git reset --hard <版本号> (git log 可查看版本号,版本号不用写全) 远程仓库版本回滚 先在本地将版本回滚 ,然后git push -f 强制提交

  10. IDEA配置JRebel实现热部署

    IDEA配置JRebel实现热部署 1.下载JRebel and XRebel for Intellij插件 2. 激活 请查看这个文章http://www.cicoding.cn/other/jre ...