1.前期准备:centos6.5 minimal版本3台
选择其中一台作为一个安装节点,能无密码登录其他机器。ssh-keygen
ssh-keygen -i ~/.ssh/id_rsa.pub node1 node2 node3
2.
命令:
yum install cepy-deploy -y
所有节点安装lsb
yum install lsb -y
关闭防火墙,后面osd服务会向mon服务请求6789端口,防火墙开了访问不了
service iptables stop
创建mon
ceph-deploy new node1 node2 node3
ceph-deploy mon create-initial
创建osd
在所有的osd服务器上执行:
mkdir -p /var/lib/ceph/osd
mkdir -p /var/lib/ceph/osd
执行命令
ceph-deploy prepare node1:/usr/local/ceph01 node2:/usr/local/ceph02 node3:/usr/local/ceph03
ceph-deploy activate node1:/usr/local/ceph01 node2:/usr/local/ceph03 node3:/usr/local/ceph03
最后执行
ceph -s
如果报错:
ceph-deploy gatherkeys node1
ceph-deploy gatherkeys node2
ceph-deploy gatherkeys node3
如果正常,OK