关键词:
glusterfs
第1章 什么是分布式文件系统?
相对于本极端的文件系统而言,分布式文件系统DFS,伙食网络文件系统NFS,是一种允许文件通过网络在多台主机上分享的文件系统你那个,可以让多机器上的多用户分享指定问加你和存储空间
在这样的文件系统中,客户端并非直接访问底层的数据存储区块,而是通过网络,以特定的通信协议和服务器沟通,借由通信协议的设计,可以让客户端和服务端都根据访问控制清单或者授权,来限制对于文件系统的访问
第2章 glusterfs简介
glusterfs是一个开源的分布式文件系统,具有强大的横向扩展能力,通过扩展能够支持数PB存储容量和处理数千客户端,glusterfs借助tcp/ip或者infinband RDMA(是一种支持多并发连接的转换线缆技术)网络将物理分布的存储资源聚集在一起,使用单一全局命名空间来管理数据,glusterfs基于可堆砌的用户空间设计,可为各种不同的数据负载提供优异的性能
第3章 glutserfs服务端部署:
3.1 环境准备:
[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[[email protected] ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Mar 18 00:27:08 lb01 systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 18 00:27:12 lb01 systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 18 01:29:20 lb01 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Mar 18 01:29:22 lb01 systemd[1]: Stopped firewalld - dynamic firewall daemon.
[[email protected] ~]# getenforce
Disabled
[[email protected] ~]# hostname -I
10.0.0.5 172.16.1.5
[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[[email protected] ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
[[email protected] ~]# getenforce
Disabled
[[email protected] ~]# hostname -I
10.0.0.6 172.16.1.6
注意:配置hosts文件这一步很关键,所有机器都要有
[[email protected] gv0]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.1.41 backup gluster服务端
172.16.1.17 web03 gluster服务端
172.16.1.18 web04
172.16.1.21 cache01 进行挂载的客户端
3.2 服务端部署
backup和web03相同操作:
yum install centos-release-gluster -y glusterfs仓库
yum -y install glusterfs-server
systemctl start glusterd
说明:可以修改镜像源进行加速
sed -i 's#http://mirror.centos.org#https://mirrors.shuosc.org#g' /etc/yum.repos.d/CentOS-Gluster-3.12.repo
3.3 建立信任池,单向建立即可,即把服务端连接在一起使之成为一个整体
[[email protected] ~]# gluster peer probe web03
peer probe: success.
3.3.1 说明:将某台机器从信任池中分离用
gluster peer datach
查看信任池建立情况
[[email protected] gv0]# gluster peer status
Number of Peers: 1
Hostname: backup
Uuid: 55a0673a-fc85-45de-92f4-ffe4c6918806
State: Peer in Cluster (Connected)
[[email protected] ~]# gluster peer status
Number of Peers: 1
Hostname: web03
Uuid: f89a8665-f94a-4246-a626-4a9e0dc6be49
State: Peer in Cluster (Connected)
3.3.2 创建分布式卷
服务端创建数据存放目录:
[[email protected] ~]# mkdir -p /data/gv0
[[email protected] ~]# mkdir –p /data/gv0
使用命令创建分布式卷,命令为test,可随意命名
[[email protected] ~]# gluster volume create test 172.16.1.5:/data/exp1/ 172.16.1.6:/data/exp1/ force
volume create: test: success: please start the volume to access data
说明:这条命令最后的force表示将文件存储在系统盘上,因为默认是不允许在系统盘上进行覆盖的
查看卷信息:服务端出入信息应为相同
[[email protected] ~]# gluster volume info test
Volume Name: test
Type: Distribute
Volume ID: 03f9176c-4e7d-49dc-a8f5-9f9f8cc08867
Status: Created
Snapshot Count: 0
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 172.16.1.5:/data/exp1
Brick2: 172.16.1.6:/data/exp1
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
启动卷
[[email protected] ~]# gluster volume start test
volume start: test: success
第4章 客户端部署:
4.1 安装软件:
[[email protected] ~]# yum install centos-release-gluster –y
[[email protected] ~]# yum install -y glusterfs glusterfs-fuse
[[email protected] ~]# mount -t glusterfs 172.16.1.17:/test /mnt/
4.2 特殊说明:
在客户端执行挂载命令时,ip或者主机名的冒号后面接的是卷名称,不是目录!
反反复复试验了两天的时间,全都错在挂载命令上,如果不接卷名接的目录,就会遇到如下报错:
[[email protected] ~]# mount.glusterfs 172.16.1.17:/data/gv0 /mnt/
Mount failed. Please check the log file for more details.
查看/var/log/glusterfs/mnt.log后发现如下信息:
1.1 进行检测:
客户端创建文件
[[email protected] mnt]# mkdir nihao
[[email protected] mnt]# ll
total 4
drwxr-xr-x 2 root root 4096 Mar 27 2018 nihao
1.2 在服务端进行查看:
[[email protected] gv0]# ll backup服务端正常
total 0
drwxr-xr-x 2 root root 6 Mar 27 03:18 nihao
[[email protected] gv0]# ll web03服务端正常
total 0
drwxr-xr-x 2 root root 6 Mar 18 00:43 nihao
至此,简单的glusterfs服务实现
第2章 扩展怎样创建复制卷和条带卷
2.1.1 创建复制卷---对比RAID1
创建数据存放目录
[[email protected] ~]# mkdir /data/exp3
[[email protected] ~]# mkdir /data/exp4
使用命令创建复制卷,命令为repl
[[email protected] data]# gluster volume create repl replica 2 transport tcp 172.16.1.5:/data/exp3/ 172.16.1.6:/data/exp4 force
volume create: repl: success: please start the volume to access data
查看卷信息
[[email protected] data]# gluster volume info repl
Volume Name: repl
Type: Replicate
Volume ID: 98182696-e065-4bdb-9a11-f6a086092983
Status: Created
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 172.16.1.5:/data/exp3
Brick2: 172.16.1.6:/data/exp4
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
启动卷
[[email protected] data]# gluster volume start repl
volume start: repl: success
2.1.2 创建条带卷---对比RAID0
创建数据存放目录
[[email protected] data]# mkdir /data/exp5
[[email protected] data]# mkdir /data/exp6
使用命令创建条带卷,命名为raid0
[[email protected] data]# gluster volume create raid0 stripe 2 transport tcp 172.16.1.5:/data/exp5/ 172.16.1.6:/data/exp6 force
volume create: raid0: success: please start the volume to access data
查看卷信息
[[email protected] data]# gluster volume info raid0
Volume Name: raid0
Type: Stripe
Volume ID: f8578fab-11c7-4aaa-b58f-b1825233cfd6
Status: Created
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 172.16.1.5:/data/exp5
Brick2: 172.16.1.6:/data/exp6
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
启动卷
[[email protected] data]# gluster volume start raid0
volume start: raid0: success
56.glusterfs分布式文件系统
GlusterFS分布式文件系统GlusterFS是一个开源的分布式文件系统,软件的结构设计良好,易于扩展和配置,通过各个模块的灵活搭配得到针对性的解决方案。可解决一下问题:网络存储,联合存储,冗余备份,大文件的负载均衡。可... 查看详情
分布式文件系统---glusterfs介绍
...terFS是Scale-Out存储解决方案Gluster的核心,它是一个开源的分布式文件系统,具有强大的横向扩展能力,通过扩展能够支持数PB存储容量和处理数千客户端。GlusterFS借助TCP/IP或InfiniBandRDMA网络将物理分布的存储资源聚集在一起,使... 查看详情
分布式文件系统-glusterfs
1.1分布式文件系统1.1.1什么是分布式文件系统 相对于本机端的文件系统而言,分布式文件系统(英语:Distributedfilesystem, DFS),或是网络文件系统(英语:NetworkFileSystem),是一种允许文件通过网络在多台主机上分享的文... 查看详情
glusterfs分布式文件系统
glusterfs第1章什么是分布式文件系统?相对于本极端的文件系统而言,分布式文件系统DFS,伙食网络文件系统NFS,是一种允许文件通过网络在多台主机上分享的文件系统你那个,可以让多机器上的多用户分享指定问加你和存储空间在这样... 查看详情
分布式文件系统--------glusterfs最佳实战
1.背景 GlusterFS是一个开源的分布式文件系统,具有强大的横向扩展能力,通过扩展能够支持数PB存储容量和处理数千客户端。GlusterFS借助TCP/IP或InfiniBandRDMA(一种支持多并发链接的“转换线缆”技术)网络将物理分布的... 查看详情
分布式文件系统--glusterfs(代码片段)
文章目录一、分布式文件系统1.文件系统1.1组成1.2作用1.3挂载使用2.分布式文件系统--GFS2.1组成2.2专业术语2.3模块化堆栈式架构2.4工作流程2.5基本卷与复合卷二、部署GlusterFS群集1准备环境2配置/etc/hosts文件3安装GlusterFS并启动4时间... 查看详情
glusterfs分布式文件系统(代码片段)
GlusterFS分布式文件系统,用于存储、管理磁盘文件文件系统(FS)文件系统组成1、文件系统接口2、对对像管理的软件集合3、对象及属性文件系统作用从系统角度来看,文件系统是对文件存储设备的空间进行组织和分配... 查看详情
脑壳有点疼。。glusterfs分布式文件系统!(更新中)
GlusterFS分布式文件系统一.文件系统简介1.组成2.作用3.挂载使用二.GlusterFS分布式文件系统1.GFS是由三部分组成(组件)2.GFS特点3.GFS专业术语4.GFS模块化堆栈式架构5.工作流程6.基本卷和复合卷三.部署GFS集群1.实验准备一.文... 查看详情
分布式文件系统---glusterfs安装配置
一、环境规划GlusterFS服务端:10.100.0.41/10.100.0.44GlusterFS客户端:10.100.0.43二、所需软件包glusterfs-server-3.4.2-1.el6.x86_64glusterfs-3.4.2-1.el6.x86_64三、安装 3.1、服务端安装#wget-P/etc/yum.repos.dhttp://dow 查看详情
glusterfs分布式文件系统概述(代码片段)
...GlusterFS的工作流程2、弹性HASH算法三、GlusterFS的卷类型1、分布式卷2、条带卷3、复制卷4、分布式条带卷5、分布式复制卷一、GlusterFS概述GlusterFS是一个开源的分布式文件系统,同时也是Scale-Out存储解决方案Gluster的核心,在存储数... 查看详情
glusterfs分布式文件系统
分布式系统要做的任务就是把多台机器有机的组合、连接起来,让其协同完成一件任务,可以是计算任务,也可以是存储任务。如果一定要给近些年的分布式系统研究做一个分类的话,大概可以包括三大部分:1.分布式存储系统2... 查看详情
glusterfs分布式文件系统部署
...terFS是Scale-Out存储解决方案Gluster的核心,它是一个开源的分布式文件系统,具有强大的横向扩展能力,通过扩展能够支持数PB存储容量和处理数千客户端。GlusterFS借助TCP/IP或InfiniBandRDMA网络将物理分布的存储资源聚集在一起,使... 查看详情
glusterfs分布式文件系统
第一:安装依赖包:yuminstalllibibverbslibrdmacmxfsprogsnfs-utilsrpcbindlibaioliblvm2app lvm2-devel libevent-devel nfs-utils-lib-develtcl-devellibsysfs-devel userspace-rcu atop ioz 查看详情
详解gfs分布式文件系统(条带卷/复制卷/分布式条带卷/分布式复制卷)(代码片段)
GFS分布式文件系统一.GlusterFS概述1.GlusterFS简介2.GlusterFS特点3.GlusterFS术语4.模块化堆栈式架构5.GlusterFS工作流程6.弹性HASH算法7.GlusterFs的卷类型二.部署GlusterFs群集三.客户端部署与测试测试总结补充:一.GlusterFS概述1.GlusterFS简介... 查看详情
glusterfs-----文件分布系统+集群部署(代码片段)
一、Gluster概述1.1、gluster简介Glusterfs是一个开源的分布式文件系统,是Scale存储的核心,能够处理千数量级的客户端.在传统的解决方案中Glusterfs能够灵活的结合物理的,虚拟的和云资源去体现高可用和企业级的性能存储.Glusterfs通过TCP... 查看详情
glusterfs-----文件分布系统+集群部署(代码片段)
一、Gluster概述1.1、gluster简介Glusterfs是一个开源的分布式文件系统,是Scale存储的核心,能够处理千数量级的客户端.在传统的解决方案中Glusterfs能够灵活的结合物理的,虚拟的和云资源去体现高可用和企业级的性能存储.Glusterfs通过TCP... 查看详情
gfs分布式文件系统(代码片段)
目录一.GlusterFS概述1.GlusterFS简介2.GlusterFS特点3.GlusterFS术语4.模块化堆栈式架构5.GlusterFS的工作流程6.弹性HASH算法7.GlusterFs的卷类型二.部署GlusterFS群集1.准备环境(所有node节点上操作)①添加硬盘,关闭防火墙,修改所有node节... 查看详情
gfs分布式文件系统(代码片段)
...GlusterFS介绍1.1GlusterFS概念1.2GlusterFS特点1.3GlusterFS术语前言分布式文件系统种类有:CEPH分布式文件系统(用的多)GFS(GlusterFS)分布式文件系统M 查看详情