二、搭建ceph准备工作
设置网卡:
admin-node为例:
外部网络:
vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
DEVICE=eno16777736
ONBOOT=yes
IPADDR=192.168.200.40
NETMASK=255.255.255.0
GATEWAY=192.168.200.1
DNS1=114.114.114.114
与openstack通信网络(只弄ceph可以不要):
vi /etc/sysconfig/network-scripts/ifcfg-eno33554960
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno33554960
DEVICE=eno33554960
ONBOOT=yes
IPADDR=192.168.100.40
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
vi /etc/sysconfig/network-scripts/ifcfg-eno50332184
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno50332184
DEVICE=eno50332184
ONBOOT=yes
IPADDR=10.0.0.40
NETWORK=255.255.255.0
GATEWAY=10.0.0.1
node1,node2,node3参照上面自己设置:
node1:
外部网络:192.168.200.41
与openstack通信网络:192.168.100.41
ceph管理网络:10.0.0.41
node2:
外部网络:192.168.200.42
与openstack通信网络:192.168.100.42
ceph管理网络:10.0.0.42
node3:
外部网络:192.168.200.43
与openstack通信网络:192.168.100.43
ceph管理网络:10.0.0.43
admin-node:
hostnamectl set-hostname admin-node
echo 10.0.0.40 admin-node >> /etc/hosts
echo 10.0.0.41 node1 >> /etc/hosts
echo 10.0.0.42 node2 >> /etc/hosts
echo 10.0.0.43 node3 >> /etc/hosts
node1:
hostnamectl set-hostname node1
echo 10.0.0.40 admin-node >> /etc/hosts
echo 10.0.0.41 node1 >> /etc/hosts
echo 10.0.0.42 node2 >> /etc/hosts
echo 10.0.0.43 node3 >> /etc/hosts
node2:
hostnamectl set-hostname node2
echo 10.0.0.40 admin-node >> /etc/hosts
echo 10.0.0.41 node1 >> /etc/hosts
echo 10.0.0.42 node2 >> /etc/hosts
echo 10.0.0.43 node3 >> /etc/hosts
node3:
hostnamectl set-hostname node3
echo 10.0.0.40 admin-node >> /etc/hosts
echo 10.0.0.41 node1 >> /etc/hosts
echo 10.0.0.42 node2 >> /etc/hosts
echo 10.0.0.43 node3 >> /etc/hosts
所有节点上:
关闭防火墙firewalld:
systemctl stop firewalld.service
systemctl disable firewalld.service
关闭selinux:
vi /etc/selinux/config
SELINUX=disabled
要使设置生效你可以选择重启或者:
setenforce 0
测试
所有节点都可以试试
ping -c 4 admin-node
ping -c 4 node1
ping -c 4 node2
ping -c 4 node3