博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
glusterfs 步骤
阅读量:7064 次
发布时间:2019-06-28

本文共 7865 字,大约阅读时间需要 26 分钟。

一、下载yum源  #  wget http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/CentOS/glusterfs-epel.repo

[root@localhost yum.repos.d]# wget http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/CentOS/glusterfs-epel.repo

--2017-07-18 15:46:43-- http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/CentOS/glusterfs-epel.repo
Resolving download.gluster.org... 23.253.208.221, 2001:4801:7824:104:be76:4eff:fe10:23d8
Connecting to download.gluster.org|23.253.208.221|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/CentOS/glusterfs-epel.repo [following]
--2017-07-18 15:46:43-- https://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/CentOS/glusterfs-epel.repo
Connecting to download.gluster.org|23.253.208.221|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1079 (1.1K)
Saving to: “glusterfs-epel.repo”

 

100%[===================================================================================================================================================>] 1,079 --.-K/s in 0s

 

2017-07-18 15:46:44 (80.5 MB/s) - “glusterfs-epel.repo” saved [1079/1079]

 

[root@localhost yum.repos.d]#

[root@localhost yum.repos.d]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
18G 14G 3.0G 82% /
tmpfs 3.9G 16K 3.9G 1% /dev/shm
/dev/vda1 485M 54M 407M 12% /boot
/dev/mapper/VG_vdb-LV_vdb
40G 832M 37G 3% /srv

二、服务端部署glusfter

[root@localhost yum.repos.d]# yum -y install glusterfs-server
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.7 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:05
extras | 3.4 kB 00:00
glusterfs-epel | 2.9 kB 00:00
glusterfs-epel/primary_db | 10 kB 00:00
glusterfs-noarch-epel | 2.9 kB 00:00
glusterfs-noarch-epel/primary_db | 2.3 kB 00:00
logstash-5.0 | 951 B 00:00
updates | 3.4 kB 00:00
updates/primary_db | 2.5 MB 00:02
Resolving Dependencies
--> Running transaction check
---> Package glusterfs-server.x86_64 0:3.6.9-1.el6 will be installed
--> Processing Dependency: glusterfs-libs = 3.6.9-1.el6 for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: glusterfs-fuse = 3.6.9-1.el6 for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: glusterfs-cli = 3.6.9-1.el6 for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: glusterfs-api = 3.6.9-1.el6 for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: glusterfs = 3.6.9-1.el6 for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: libgfapi.so.0(GFAPI_PRIVATE_3.4.0)(64bit) for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: libgfapi.so.0(GFAPI_3.4.0)(64bit) for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: libglusterfs.so.0()(64bit) for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: libgfxdr.so.0()(64bit) for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: libgfrpc.so.0()(64bit) for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Processing Dependency: libgfapi.so.0()(64bit) for package: glusterfs-server-3.6.9-1.el6.x86_64
--> Running transaction check
---> Package glusterfs.x86_64 0:3.6.9-1.el6 will be installed
---> Package glusterfs-api.x86_64 0:3.6.9-1.el6 will be installed
---> Package glusterfs-cli.x86_64 0:3.6.9-1.el6 will be installed
---> Package glusterfs-fuse.x86_64 0:3.6.9-1.el6 will be installed
---> Package glusterfs-libs.x86_64 0:3.6.9-1.el6 will be installed
--> Finished Dependency Resolution

 

Dependencies Resolved

 

=============================================================================================================================================================================================

Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
glusterfs-server x86_64 3.6.9-1.el6 glusterfs-epel 720 k
Installing for dependencies:
glusterfs x86_64 3.6.9-1.el6 glusterfs-epel 1.4 M
glusterfs-api x86_64 3.6.9-1.el6 glusterfs-epel 64 k
glusterfs-cli x86_64 3.6.9-1.el6 glusterfs-epel 143 k
glusterfs-fuse x86_64 3.6.9-1.el6 glusterfs-epel 93 k
glusterfs-libs x86_64 3.6.9-1.el6 glusterfs-epel 282 k

 

Transaction Summary

=============================================================================================================================================================================================
Install 6 Package(s)

 

Total download size: 2.7 M

Installed size: 8.6 M
Downloading Packages:
(1/6): glusterfs-3.6.9-1.el6.x86_64.rpm | 1.4 MB 00:03
(2/6): glusterfs-api-3.6.9-1.el6.x86_64.rpm | 64 kB 00:00
(3/6): glusterfs-cli-3.6.9-1.el6.x86_64.rpm | 143 kB 00:00
(4/6): glusterfs-fuse-3.6.9-1.el6.x86_64.rpm | 93 kB 00:01
(5/6): glusterfs-libs-3.6.9-1.el6.x86_64.rpm | 282 kB 00:03
(6/6): glusterfs-server-3.6.9-1.el6.x86_64.rpm | 720 kB 00:10
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 108 kB/s | 2.7 MB 00:25
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA256 Signature, key ID d5dc52dc: NOKEY
Retrieving key from http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/rsa.pub
Importing GPG key 0xD5DC52DC:
Userid: "Gluster Packager <glusterpackager@download.gluster.org>"
From : http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/rsa.pub
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : glusterfs-libs-3.6.9-1.el6.x86_64 1/6
Installing : glusterfs-3.6.9-1.el6.x86_64 2/6
Installing : glusterfs-api-3.6.9-1.el6.x86_64 3/6
Installing : glusterfs-fuse-3.6.9-1.el6.x86_64 4/6
Installing : glusterfs-cli-3.6.9-1.el6.x86_64 5/6
Installing : glusterfs-server-3.6.9-1.el6.x86_64 6/6
Verifying : glusterfs-fuse-3.6.9-1.el6.x86_64 1/6
Verifying : glusterfs-api-3.6.9-1.el6.x86_64 2/6
Verifying : glusterfs-libs-3.6.9-1.el6.x86_64 3/6
Verifying : glusterfs-cli-3.6.9-1.el6.x86_64 4/6
Verifying : glusterfs-server-3.6.9-1.el6.x86_64 5/6
Verifying : glusterfs-3.6.9-1.el6.x86_64 6/6

 

Installed:

glusterfs-server.x86_64 0:3.6.9-1.el6

 

Dependency Installed:

glusterfs.x86_64 0:3.6.9-1.el6 glusterfs-api.x86_64 0:3.6.9-1.el6 glusterfs-cli.x86_64 0:3.6.9-1.el6 glusterfs-fuse.x86_64 0:3.6.9-1.el6 glusterfs-libs.x86_64 0:3.6.9-1.el6

 

Complete!

三、启动 四、为存储池添加/移出服务器节点

在其中一个节点上操作即可

gluster peer probe <SERVER>
gluster peer detach <SERVER>
注意,移出节点时,需要提前将该节点上的Brick移除
查看所有节点的基本状态(显示的时候不包括本节点)
gluster peer status

 

当在glusterfs中将服务器加到存储池中,及运行”gluster peer probe server”命令,

遇到peer probe: failed: Probe returned with unknown errno 107错误时,可以从以下几个方面解决问题

1、查看目标服务器上的防火墙是否关闭

2、查看glusterd在两台机器上都启动并运行

3、检查两台服务器能否ping的通

五、

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root
18G 14G 3.0G 83% /
tmpfs 3.9G 16K 3.9G 1% /dev/shm
/dev/vda1 485M 54M 407M 12% /boot
/dev/mapper/VG_vdb-LV_vdb
40G 832M 37G 3% /srv
[root@localhost yum.repos.d]# mkdir -pv /data1/brick1/gv0
mkdir: created directory `/data1/brick1'
mkdir: created directory `/data1/brick1/gv0'
[root@localhost yum.repos.d]# gluster volume create gv0 replica 2 115.182.109.177:/data1/brick1/gv0/ 115.182.103.180:/data1/brick1/gv0/
volume create: gv0: failed: The brick 115.182.109.177:/data1/brick1/gv0 is being created in the root partition. It is recommended that you don't use the system's root partition for storage backend. Or use 'force' at the end of the command if you want to override this behavior.

 

六、

 

转载于:https://www.cnblogs.com/yycc/p/7200700.html

你可能感兴趣的文章
[ASP.NET MVC]通过对HtmlHelper扩展简化“列表控件”的绑定
查看>>
[译] 关于 React Router 4 的一切
查看>>
vivo联手火星情报局打造最强粉丝嘉年华:超级装备X20惊艳全场
查看>>
本田推出电动车和多功能移动机器人,2019年上市
查看>>
将DJANGO管理界面的filter_horizontal移到前面来复用
查看>>
苹果手机定位用户行迹:是否对信息安全构成威胁?
查看>>
金风科技澳洲首座20兆瓦光伏电站将于2017年投产
查看>>
Java 代理
查看>>
《Effective Debugging:软件和系统调试的66个有效方法》——第12条:将复杂的测试场景自动化...
查看>>
企业物联网安全的四个关键步骤
查看>>
盗版的软件更易被攻击 勒索钱财是黑客惯用形式
查看>>
SPI绿能宝与金沙江资本签署5亿美元可转债协议
查看>>
中英专家建言:未来城市发展要智慧化“留白”
查看>>
象棋中马行走路线的测试用例设计
查看>>
乌当区前三季度大数据产业实现产值60亿元
查看>>
可以拖动的弹出窗
查看>>
Tiny之Web工程构建
查看>>
android 的android httpClient详解
查看>>
IOS SEL的理解与使用
查看>>
iOS开发实用技巧—Objective-C中的各种遍历(迭代)方式
查看>>