glusterFS分布式文件系统群集

6 篇文章 0 订阅

打开五台虚拟机

每台虚拟机添加一块硬盘(25G即可)

打开虚拟机

添加hosts数据(centos01)

[root@centos01 ~]# vim /etc/hosts

192.168.100.10 centos01

192.168.100.20 centos02

192.168.100.30 centos03

192.168.100.40 centos04

192.168.100.50 centos05

使用scp互传到其他四台上去

[root@centos01 ~]# scp /etc/hosts root@192.168.100.20:/etc/hosts

[root@centos01 ~]# scp /etc/hosts root@192.168.100.30:/etc/hosts

[root@centos01 ~]# scp /etc/hosts root@192.168.100.40:/etc/hosts

[root@centos01 ~]# scp /etc/hosts root@192.168.100.50:/etc/hosts

分配磁盘空间(centos01)、

配置三个主分区

两个逻辑分区

一个扩展分区

[root@centos01 ~]# fdisk /dev/sdb

设置磁盘文件类型

[root@centos01 ~]# mkfs.xfs /dev/sdb1

[root@centos01 ~]# mkfs.xfs /dev/sdb2

[root@centos01 ~]# mkfs.xfs /dev/sdb3

[root@centos01 ~]# mkfs.xfs /dev/sdb4

[root@centos01 ~]# mkfs.xfs /dev/sdb5

[root@centos01 ~]# mkfs.xfs /dev/sdb6

添加完成后进行保存

 

循环创建多个目录

创建挂载点

[root@centos01 ~]# vim /etc/fstab

重启电脑

Reboot

为centos其他主机创建分区

安装服务Glusterfs

修改hosts文件

安装服务

[root@centos01 ~]# yum -y install glusterfs gluster

启动服务并设置开机自启

[root@centos01 ~]# systemctl start glusterd

[root@centos01 ~]# systemctl enable glusterd

创建集群

[root@centos01 ~]#  gluster peer probe centos02

[root@centos01 ~]#  gluster peer probe centos03

[root@centos01 ~]#  gluster peer probe centos04

[root@centos01 ~]#  gluster peer probe centos05

[root@centos01 ~]#  gluster peer probe centos06

查看集群状态

[root@centos01 ~]#  gluster peer status

创建分布式卷、条带卷、复制卷、分布式条带卷、分布式复制卷、(并启动)

客户端进行访问控制

创建挂载点

Mkdir /分布式

Mkdir /条带卷

Mkdir /复制卷

Mkdir /分布式条带卷

Mkdir /分布式复制卷

手动挂载一下

Mount –t glusterfs 192.168.100.10

设置自动挂载

Vim /etc /fstab

进行重启后查看

Df –Th

查看所有卷

[root@centos01 ~]#  gluster volume list

启动、停止、删除、查看状态就可以了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值