实验环境
4台GFS节点服务器做GlusterFS集群,提供存储服务给KVM客户端做虚拟化
服务器角色 | IP地址 |
---|---|
node1 | 192.168.35.188 |
node2 | 192.168.35.191 |
node3 | 192.168.35.192 |
node4 | 192.168.35.142 |
kvm | 192.168.35.182 |
第一步:部署GFS节点服务器
1.为四台GFS节点服务器服务器每台添加一个新磁盘
2.使用脚本一键部署GFS节点
#!/bin/bash
systemctl stop firewalld.service
setenforce 0
#格式化磁盘
echo "the disks exist list:"
fdisk -l |grep '磁盘 /dev/sd[a-z]'
echo "=================================================="
PS3="chose which disk you want to create:"
select VAR in `ls /dev/sd*|grep -o 'sd[b-z]'|uniq` quit
do
case $VAR in
sda)
fdisk -l /dev/sda
break ;;
sd[b-z])
#create partitions