ceph详细安装部署教程(多监控节点)

ceph详细安装部署教程(多监控节点)

一、前期准备安装ceph-deploy工具 所有的服务器都是用root用户登录的1、安装环境 系统centos-6.5 设备:1台admin-node (ceph-ploy) 1台 monistor 2台 osd2、关闭所有节点的防火墙及关闭selinux,重启机器。 service iptables stop sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config chkconfig iptables off 3、编辑admin-node节点的ceph yum仓库vi

/etc/yum.repos.d/ceph.repo [ceph-noarch]name=Ceph noarch

packagesbaseurl=http://ceph.com/rpm/el6/noarch/enabled=1gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc4、安装搜狐的epel仓库 rpm -ivh

http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm5、更新admin-node节点的yum源 yum clean all yum update -y6、在admin-node节点上建立一个ceph集群目录 mkdir /ceph cd /ceph7、在admin-node节点上安装ceph部署工具 yum install ceph-deploy -y8、配置admin-node节点的hosts文件 vi /etc/hosts10.240.240.210 admin-node10.240.240.211

node110.240.240.212 node210.240.240.213 node3二、配置ceph-deploy部署的无密码登录每个ceph节点 1、在每个Ceph节点上安装一个SSH服务器 [ceph@node3 ~]$ yum install openssh-server -y2、配置您的admin-node管理节点与每个Ceph节点无密码的SSH访问。[root@ceph-deploy ceph]# ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa.Your public key has been saved in /root/.ssh/id_rsa.pub.3、复制admin-node节点的秘钥到每个ceph节点 ssh-copy-id root@admin-node ssh-copy-id root@node1 ssh-copy-id root@node2 ssh-copy-id root@node34、测试每台ceph节点不用密码是否可以登录 ssh root@node1 ssh

root@node2 ssh root@node35、修改admin-node管理节点的~/.ssh / config文件,这样它登录到Ceph节点创建的用户Host admin-node Hostname admin-node User root Host node1 Hostname node1 User rootHost node2 Hostname node2 User rootHost node3 Hostname node3 User root三、用ceph-deploy工具部署ceph集群1、在admin-node节点上新建一个ceph集群

[root@admin-node ceph]# ceph-deploy new node1 node2 node3 (执行这条命令后node1 node2 node3都作为了monitor节点,多个mon节点可以实现互备)[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf[ceph_deploy.cli][INFO ] Invoked (1.5.3): /usr/bin/ceph-deploy new node1 node2

node3[ceph_deploy.new][DEBUG ] Creating new cluster named ceph[ceph_deploy.new][DEBUG ] Resolving host node1[ceph_deploy.new][DEBUG ] Monitor node1 at 10.240.240.211[ceph_deploy.new][INFO ] making sure passwordless SSH succeeds[node1][DEBUG ] connected to host: admin-node [node1][INFO ] Running command: ssh -CT -o BatchMode=yes

node1[ceph_deploy.new][DEBUG ] Resolving host node2[ceph_deploy.new][DEBUG ] Monitor node2 at 10.240.240.212[ceph_deploy.new][INFO ] making sure passwordless SSH succeeds[node2][DEBUG ] connected to host: admin-node [node2][INFO ] Running command: ssh -CT -o BatchMode=yes

node2[ceph_deploy.new][DEBUG ] Resolving host node3[ceph_deploy.new][DEBUG ] Monitor node3 at 10.240.240.213[ceph_deploy.new][INFO ] making sure

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4