1.首先安装一个all-in-one的openstack环境
10.33.41.55上的hcloud-lxp:192.168.1.112 浮动IP:10.33.41.134
这里从ubuntu_1404_pure启动两个虚拟机,作为ceph的osd节点,而ceph的mon/mds节点使用all-in-one的环境
总结如下:
名称 |
hostname |
固定IP |
浮动IP |
角色 |
备注 |
Hcloud-lxp |
ubuntu |
192.168.1.120 |
10.33.41.134 |
Openstack |
从hcloud启动 |
lxp-ceph1 |
lxpnode1 |
192.168.11.6 |
10.33.41.135 |
Ceph mon |
从ubuntu_1404_pure启动 |
lxp-ceph2 |
lxpnode2 |
192.168.11.7 |
10.33.41.136 |
Ceph osd1 |
从ubuntu_1404_pure启动 |
lxp-ceph3 |
lxpnode3 |
192.168.11.8 |
10.33.41.139 |
Ceph osd2 |
从ubuntu_1404_pure启动 |
将源配置成:
deb file:/opt/hCloud_Install debpackage/
这里openstack的环境就不要改了,因为改了这个hostname,很多config都要改,索性不改。
修改/etc/hostname和/etc/hosts
保存快照
关机,为ceph2、ceph3增加云硬盘,然后启动
将IP改成10.33.41网段
2.安装ceph
接下来在lxp-ceph1、lxp-ceph2、lxp-ceph3搭建ceph环境
apt-get install ceph
apt-get install ceph-deploy
apt-get install-y ntp ntpdate ntp-doc
# cd /etc/ceph
# ceph-deploy new lxpnode1
修改配置:
root@lxpnode1:/etc/ceph# vi ceph.conf
[global]
fsid = 1d082422-3283-4df7-a444-355ff17076e0
mon_initial_members = lxpnode1
mon_host = 192.169.1.121
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
filestore_xattr_use_omap = true
public network = 192.168.11.0/24
cluster network = 192.168.11.0/24
osd_pool_default_size = 2
~
# cd /etc/ceph
# ceph-deploy new lxpnode1
# ceph-deploy install lxpnode1 lxpnode2lxpnode3
# ceph-deploy --overwrite-conf mon create-initial
#ceph-deploy mon create lxpnode1
# ceph-deploy gatherkeys lxpnode1
# scp -r /etc/ceph/ lxpnode2:/etc
# scp -r /etc/ceph/ lxpnode3:/etc
# mkdir -p /data/osd.0
# mkdir -p /data/osd.1
# ufw disable
# ceph-deploy osd prepare lxpnode2:/data/osd.0:/dev/vdblxpnode3:/data/osd.1:/dev/vdb
# ceph-deploy osd activate lxpnode2:/data/osd.0:/dev/vdblxpnode3:/data/osd.1:/dev/vdb
终于OK了!