分布式文件系统之Glusterfs
1、环境规划如下
centos7.4 三个节点一块 sdb 3G大小的测试硬盘

2、Glusterfs 卷的类型比较多,这里我们测试最常用的一种 Distributed Replicated Glusterfs Volume,架构如下

3、安装部署
、准备yum源
yum install centos-release-gluster -y 、Format and mount the bricks 三个节点操作
[root@glusterfs1 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x56ea90c1. Command (m for help): n
Partition type:
p primary ( primary, extended, free)
e extended
Select (default p): p
Partition number (-, default ):
First sector (-, default ):
Using default value
Last sector, +sectors or +size{K,M,G} (-, default ):
Using default value
Partition of type Linux and of size GiB is set Command (m for help): p Disk /dev/sdb: MB, bytes, sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk label type: dos
Disk identifier: 0x56ea90c1 Device Boot Start End Blocks Id System
/dev/sdb1 Linux Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.
[root@glusterfs1 ~]# mkfs.xfs -f /dev/sdb
meta-data=/dev/sdb isize= agcount=, agsize= blks
= sectsz= attr=, projid32bit=
= crc= finobt=, sparse=
data = bsize= blocks=, imaxpct=
= sunit= swidth= blks
naming =version bsize= ascii-ci= ftype=
log =internal log bsize= blocks=, version=
= sectsz= sunit= blks, lazy-count=
realtime =none extsz= blocks=, rtextents=
[root@glusterfs1 ~]#
[root@glusterfs1 ~]# mkdir -p /storage/brick1 #建立挂载块设备的目录
yum -y install xfsprogs 安装xfs包
[root@glusterfs1 ~]# mount /dev/sdb /storage/brick1 [root@glusterfs1 ~]# echo "/dev/sdb /storage/brick1 xfs defaults 0 0" >> /etc/fstab
[root@glusterfs1 ~]# mount -a && mount
[root@glusterfs1 ~]# yum install glusterfs-server -y

节点加入信任存储池
[root@glusterfs1 ~]# iptables -I INPUT -s 192.168.10.0/ -j ACCEPT
[root@glusterfs1 ~]#
[root@glusterfs1 ~]#
[root@glusterfs1 ~]# gluster peer probe glusterfs2
peer probe: success.
[root@glusterfs1 ~]# gluster peer probe glusterfs3
peer probe: success.
[root@glusterfs1 ~]# gluster peer status
Number of Peers: Hostname: glusterfs2
Uuid: 6e7eb8e4-e4ec-4d60-8fa5-98f856759810
State: Peer in Cluster (Connected) Hostname: glusterfs3
Uuid: 861d2297--4f64-99e2-c16d46de60d9
State: Peer in Cluster (Connected)
[root@glusterfs1 ~]# [root@glusterfs1 ~]# glusterfs -V
glusterfs 3.12.
Repository revision: git://git.gluster.org/glusterfs.git
Copyright (c) - Red Hat, Inc. <https://www.gluster.org/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version or any later version (LGPLv3
or later), or the GNU General Public License, version (GPLv2),
in all cases as published by the Free Software Foundation. 设置 GlusterFS volume
[root@glusterfs1 ~]# mkdir -p /storage/brick1 #每个节点都需要操作
[root@glusterfs1 ~]# gluster volume create gv0 replica 3 glusterfs1:/storage/brick1 glusterfs2:/storage/brick1 glusterfs3:/storage/brick1 force #创建分布式的复制卷
volume create: gv0: success: please start the volume to access data
[root@glusterfs1 ~]#
[root@glusterfs1 ~]# gluster volume start gv0
volume start: gv0: success
[root@glusterfs1 ~]# gluster volume info
Volume Name: gv0
Type: Replicate
Volume ID: 18bfd54d-43b0-4be8-85d6-2b385db61dc4
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: glusterfs1:/storage/brick1
Brick2: glusterfs2:/storage/brick1
Brick3: glusterfs3:/storage/brick1
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
Testing the GlusterFS volume
[root@glusterfs1 ~]# mount -t glusterfs glusterfs1:/gv0 /mnt
[root@glusterfs1 ~]# for i in `seq -w 1 100`; do cp -rp /var/log/messages /mnt/copy-test-$i; done
[root@glusterfs1 ~]# ls -lA /mnt/copy* | wc -l
100
在其他节点查看


分布式文件系统之Glusterfs的更多相关文章
- 分布式文件系统GlusterFS
转自于:http://www.cnblogs.com/zitjubiz/archive/2012/11/30/Distributed_File_System_glusterFS.html Gluste ...
- GlusterFS分布式文件系统的使用
glusterfs是一款开源的分布式文件系统. 它具备高扩展.高可用及高性能等特性,由于其无元数据服务器的设计,使其真正实现了线性的扩展能力,使存储总容量可轻松达到PB级别,支持数千客户端并发访问. ...
- GlusterFS 分布式文件系统的使用入门-管理GlusterFS卷
GlusterFS 分布式文件系统的使用入门-管理GlusterFS卷 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.卷的扩容 您可以根据需要在群集联机且可用时扩展卷.例如,您 ...
- GlusterFS分布式文件系统部署及基本使用(CentOS 7.6)
GlusterFS分布式文件系统部署及基本使用(CentOS 7.6) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Gluster File System 是一款自由软件,主要由 ...
- 分布式文件系统---GlusterFS
1.1 分布式文件系统 1.1.1 什么是分布式文件系统 相对于本机端的文件系统而言,分布式文件系统(英语:Distributed file system, DFS),或是网络文件系统(英语:Netw ...
- GlusterFS分布式文件系统部署
GlusterFS是一个可伸缩的网络文件系统,使用常见的现成的硬件,您可以创建大型分布式存储流媒体解决方案.数据分析.和其他数据相关的任务.GlusterFS是自由和开源软件. 详细参考官网:http ...
- GlusterFS分布式文件系统高速管理
TaoCloud XDFS基于GlusterFS开源分布式文件系统,进行了系统优化.project化.定制化和产品化工作,五年以上的实践积累了大量实践经验,包含客户案例.最佳实践.定制开发.咨询服务和 ...
- GlusterFS 分布式文件系统
简介 官方文档:https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/ Glusterfs是一个开源的分布式文件系统,是S ...
- 【架构设计】分布式文件系统 FastDFS的原理和安装使用
本文地址 分享提纲: 1.概述 2. 原理 3. 安装 4. 使用 5. 参考文档 1. 概述 1.1)[常见文件系统] Google了一下,流行的开源分布式文件系统有很多,介绍如下: -- mo ...
随机推荐
- java基础编程——链表反转
题目描述 输入一个链表,按链表值从尾到头的顺序返回一个ArrayList. 题目代码 /** * @program: JavaCode * @description:输入一个链表,按链表值从尾到头 ...
- 扩展 -------jQuery
本文摘要:http://www.liaoxuefeng.com/ 编写jQuery插件 为了满足需求,我们经常会调用一些插件,js插件都是别人写的,今天就来了解了解一些方法. 给jQuery对象绑定一 ...
- C#的接口基础教程之二 定义接口
定义接口 从技术上讲,接口是一组包含了函数型方法的数据结构.通过这组数据结构,客户代码可以调用组件对象的功能. 定义接口的一般形式为: [attributes] [modifiers] interfa ...
- iOS开发遇到的坑之七--上传app Stroe被拒绝:The app references non-public symbols in : _UICreateCGImageFromIOSurface
这是上学期遇到的问题了,突然查阅邮箱的时候发现了,遂在这里记录下来,希望大家以后注意这个问题 我上传App Store的时候,apple给我发的邮件原文: Dear developer, We hav ...
- 垂直居中一个img
{ display:table-cell; text-align:center; vertical-align:middle; }
- python 写 组合两两组合
紧挨着 组合 a b c d ----> ab ,bc ,cd portList = ['a', 'b', 'c', 'd'] for i, p in enumerate(portList) ...
- 五、Shell 基本运算符
Shell 基本运算符 Shell 和其他编程语言一样,支持多种运算符,包括: 算数运算符 关系运算符 布尔运算符 字符串运算符 文件测试运算符 原生bash不支持简单的数学运算,但是可以通过其他命令 ...
- Mysql忘记密码找回步骤
Mysql密码忘记找回步骤: 1.首先停止数据库 [root@localhost ~]# /etc/init.d/mysqld stop 2.使用--skip-grant-tables启动mysql, ...
- 42.VUE学习之--组件之子组件使用$on与$emit事件触发父组件实现购物车功能
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- String java问题随笔
1.字符串加密 设计思想: 每个字符都能够转化为整数型,也能将整数型转化为字符类型,这样我们在加密时候由于向后推3个,所以可以将字符转换为整形,然后加3,之后在将运算完的变量转化为字符后输出,就可以实 ...