Ubuntu对接GlusterFS
存储节点部署示例环境,仅供参考
| 主机名 | 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的更多相关文章
- Ubuntu: GlusterFS+HBase安装教程
HBase通常安装在Hadoop HDFS上,但也能够安装在其它实现了Hadoop文件接口的分布式文件系统上.如KFS. glusterfs是一个集群文件系统可扩展到几peta-bytes. 它集合了 ...
- Ubuntu 搭建 GlusterFS 过程笔记
https://download.gluster.org/pub/gluster/ #要安装的东西 ---- ``` apt install -y build-essential gcc make c ...
- k8s 对接glusterfs存储
service 与 endpoint 是通过namespace相同,name相同,相互关联的 创建endpoint [root@k8s-master glusterfs]# cat glusterfs ...
- CentOS对接GlusterFS
存储节点部署示例环境,仅供参考 主机名 IP 系统 gfs01 10.10.10.13 CentOS 7.4.1708 gfs02 10.10.10.14 CentOS 7.4.1708 一.Glus ...
- ubuntu安装glusterFS
以2台服务器为例: node1: 172.18.1.10 node2: 172.18.1.20 1) 修改主机名,修改hosts文件添加IP地址映射 hostname node1/node2vim / ...
- GlusterFS分布式存储系统复制集更换故障Brick操作记录
场景: GlusterFS 3节点的复制集,由于磁盘故障,其中一个复制集需要重装系统,所以需要重装glusterfs并将该节点加入glusterfs集群 一. 安装GlusterFS 首先在重装系统节 ...
- Ubuntu Server 12.04下部署glusterfs
1.安装环境 Linux:Ubuntuserver 12.04.1 LTS 64bit 2台 分布式文件系统:Gluster 测试环境:一台作文件服务器端(192.168.56.133),一台作客户端 ...
- 【分布式存储】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 ...
- ubuntu glusterfs 配置调试
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqMAAADpCAIAAACfoakcAAAgAElEQVR4nO2d2XMjSX7f8c+sQ4GwHY
随机推荐
- C# 队列Queue,ConcurrentQueue,BlockingCollection 并发控制lock,Monitor,信号量Semaphore
什么是队列? 队列Queues,是一种遵循先进先出的原则的集合,在.netCore中微软给我们提供了很多个类,就目前本人所知的有三种,分别是标题提到的:Queue.ConcurrentQueue.Bl ...
- PPT技术干货1(下)——数据图表分析、逻辑梳理、高效办公
数据分析 让数据指导决策,帮你获得业绩增长 数据展示是PPT必备的基础技能, 有些人是简单粗暴的将数据直接堆在页面上: 这样的汇报缺乏重点,不具有针对性. 图表该如何设计呢? 1.数据可视化,内容交互 ...
- Spring Boot 与 Spring MVC到底有什么区别
前言 Spring 框架就像一个家族,有众多衍生产品例如 boot.security.jpa等等.但他们的基础都是Spring 的 ioc和 aop ioc 提供了依赖注入的容器 aop ,解决了面向 ...
- Ext CheckBoxGroup使用
一.效果图展示 我这里主要是为了实现选择周期时间.如周一.周二.周三等 二.界面界面代码 下面就是我实现的代码,包含了界面.数据处理.回填数据等.可能架构的方式,您的代码和我的代码有差异,但是大体就是 ...
- Gitignore 配置语法
Gitignore 配置语法 原文地址:http://kuanghy.github.io/2016/05/17/gitignore Git 的 .gitignore 配置文件用于配置不需要加入到版本管 ...
- [leetcode]138. Copy List with Random Pointer复制带有随机指针的链表
public RandomListNode copyRandomList(RandomListNode head) { /* 深复制,就是不能只是复制原链表变量,而是做一个和原来链表一模一样的新链表, ...
- Spring boot 启动错误处理:Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular...
错误原因 在pom中引入了mybatis-spring-boot-starter ,Spring boot默认会加载org.springframework.boot.autoconfigure.jdb ...
- Docker容器安装nginx基本步骤Yum版
首先我们来科普一下nginx: Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务.Nginx是由伊戈尔·赛索耶夫为俄罗斯访问 ...
- 总结(2019CSP之后),含题解
从\(\mathcal{CSP}\) 爆炸 到现在,已经有\(3\)个月了.这三个月间,我--这个小蒟蒻又接触了许多听不懂的东西 \(\mathcal{No.}1\) 字符串\(\mathcal{ha ...
- 2021升级版微服务教程6—Ribbon使用+原理+整合Nacos权重+实战优化 一篇搞定
2021升级版SpringCloud教程从入门到实战精通「H版&alibaba&链路追踪&日志&事务&锁」 教程全目录「含视频」:https://gitee.c ...