私有云落地解决方案之openstack高可用(pike版本)-添加存储节点

标签: openstack 解决方案 私有云 高可用 ha
668人阅读 评论(0) 收藏 举报
分类:

作者:【吴业亮】

博客:http://blog.csdn.net/wylfengyujiancheng

一、前提条件
各个节点的时间同步

二、基础配置
1、安装软件包

# yum  -y install openstack-cinder python2-crypto targetcli

2、修改配置文件

# mv /etc/cinder/cinder.conf /etc/cinder/cinder.conf.org 
# vi /etc/cinder/cinder.conf
[DEFAULT]
# define own IP address
my_ip = 172.16.8.63
log_dir = /var/log/cinder
state_path = /var/lib/cinder
auth_strategy = keystone
# RabbitMQ connection info
transport_url = rabbit://openstack:Changeme_123@172.16.8.50
# Glance connection info
glance_api_servers = http://172.16.8.50:9292

# MariaDB connection info
[database]
connection = mysql+pymysql://cinder:Changeme_123@172.16.8.50/cinder

# Keystone auth info
[keystone_authtoken]
auth_uri = http://172.16.8.50:5000
auth_url = http://172.16.8.50:35357
memcached_servers = node1:11211,node2:11211,node3:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = Changeme_123

[oslo_concurrency]
lock_path = /var/lib/cinder/tmp

3、修改权限

# chmod 640 /etc/cinder/cinder.conf 
# chgrp cinder /etc/cinder/cinder.conf 

4、启动服务

# systemctl start openstack-cinder-volume 
# systemctl enable openstack-cinder-volume

三、配置lvm后端存储

创建逻辑卷

# pvcreate /dev/sdb 
# vgcreate  Cinder-LVM /dev/sdb 

修改配置文件/etc/cinder/cinder.conf

[DEFAULT]
enabled_backends = lvm
[lvm]
iscsi_helper = lioadm
# volume group name just created
volume_group = Cinder-LVM
# IP address of Storage Node
iscsi_ip_address = 172.16.8.63
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volumes_dir = $state_path/volumes
iscsi_protocol = iscsi
volume_backend_name = lvm

重启服务

# systemctl restart openstack-cinder-volume

在计算节点上修改配置文件/etc/nova/nova.conf

[cinder]
os_region_name = RegionOne

在计算节点上重启服务

# systemctl restart openstack-nova-compute

四、配置nfs后端存储(存储节点上)

安装软件包

# yum -y install nfs-utils
# systemctl start rpcbind 
# systemctl enable rpcbind

修改配置文件/etc/cinder/cinder.conf

[DEFAULT]
enabled_backends = nfs

[nfs]
volume_driver = cinder.volume.drivers.nfs.NfsDriver
nfs_shares_config = /etc/cinder/nfs_shares
volume_backend_name = nfs

创建文件/etc/cinder/nfs_shares

172.16.8.63:/opt/cinder-nfs

172.16.8.63 是nfs服务器的IP

修改权限

# chmod 640 /etc/cinder/nfs_shares 
# chgrp cinder /etc/cinder/nfs_shares 

重启服务

# systemctl restart openstack-cinder-volume 

修改权限

# chown -R cinder. /var/lib/cinder/mnt 

以下操作计算节点上
安装rpm

# yum -y install nfs-utils

启动服务并设置开机启动

# systemctl start rpcbind 
# systemctl enable rpcbind

修改配置文件/etc/nova/nova.conf

[cinder]
os_region_name = RegionOne

重启服务

# systemctl restart openstack-nova-compute

五、创建多后端存储

修改配置文件/etc/cinder/cinder.conf

[DEFAULT]
enabled_backends = lvm,nfs

[lvm]
iscsi_helper = lioadm
volume_group = Cinder-LVM
iscsi_ip_address = 172.16.100.50
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volumes_dir = $state_path/volumes
iscsi_protocol = iscsi
volume_backend_name = lvm


[nfs]
volume_driver = cinder.volume.drivers.nfs.NfsDriver
volume_backend_name = NFS
nfs_shares_config = /etc/cinder/nfs_shares
nfs_mount_point_base = $state_path/mnt_nfs
volume_backend_name = nfs

创建挂载目录

# mkdir  /var/lib/cinder/mnt_nfs
# chown cinder:cinder /var/lib/cinder/mnt_nfs

创建存储类型(控制节点执行)

# openstack volume type create lvm 
# openstack volume type create nfs 
# openstack volume type list 
# cinder --os-username admin --os-tenant-name admin type-key lvm set volume_backend_name=lvm
# cinder --os-username admin --os-tenant-name admin type-key nfs  set volume_backend_name=nfs

六、配置cinder-backup

修改配置文件 /etc/cinder/cinder.conf

[DEFAULT]
backup_driver = cinder.backup.drivers.nfs
backup_mount_point_base = $state_path/backup_nfs
backup_share = 172.16.8.63:/var/lib/cinder-backup

启动服务

# systemctl start openstack-cinder-backup 
# systemctl enable openstack-cinder-backup 

修改权限

# chown -R cinder. /var/lib/cinder/backup_nfs
查看评论

OpenStack Pike版本部署手册

Openstack安装部署文档(Pike) 一、  环境准备 本文的安装部署都是在CentOS 7.4 上完成,本文中的各个节点都是双网卡设置   1.        虚拟机节点拓扑部署和主...
  • weixin_39992639
  • weixin_39992639
  • 2018-01-11 14:13:02
  • 1359

PackStack安装OpenStack Pike

登录OpenStack Horizon
  • chenhaifeng2016
  • chenhaifeng2016
  • 2017-12-28 17:58:14
  • 607

[译] OpenStack Pike 版本中的 53 个新功能盘点

原文:https://www.mirantis.com/blog/53-things-to-look-for-in-openstack-pike/ 作者:Mirantis Nick Chase 发...
  • buyaoxx
  • buyaoxx
  • 2017-08-31 12:21:33
  • 2159

Openstack Cinder创建卷错误排错过程

由于项目中使用的OpenStack一直停留在F版本,因此在操作系统(Ubuntu 12.04 LTS)不断更新的情况下,难免会出现各种莫名其妙的问题。 安装完Openstack,各子模块均运行正常,开...
  • dysj4099
  • dysj4099
  • 2014-01-04 10:05:27
  • 4659

E版Openstack通过dashboard创建卷失败一例(01)

问题描述:dashboard中创建卷失败 查看日志文件 tail /var/log/nova/volume.log 看到有如下内容: RROR nova.volume.iscsi [req-534...
  • ddl007
  • ddl007
  • 2013-01-10 18:05:35
  • 2030

OpenStack高可用核心架构分析

一、OpenStack架构与HA分析 OpenStack实际上是由众多服务组合而成,它们之间的关联或多或少,而且具有一定的层次关系,每个服务就像积木块一样,你可以根据实际需要进行取舍并组合搭建,...
  • moonpure
  • moonpure
  • 2016-10-22 19:16:57
  • 1770

使用rdo安装openstack

1、安装最新的openstack rdo的yum源yum install -y https://www.rdoproject.org/repos/rdo-release.rpm2、安装openstac...
  • linshenyuan1213
  • linshenyuan1213
  • 2017-09-08 16:27:06
  • 2615

openstack 对接 NFS 存储

NFS 服务器端 1. 安装NFS服务 # yum install -y rpcbind nfs-utils 2. iptables端口设置 # iptables -I INP...
  • zhongbeida_xue
  • zhongbeida_xue
  • 2017-11-17 18:05:52
  • 168

Openstack从入门到精通-(最新Pike版避免踩坑)

-
  • 2017年10月23日 15:57

OpenStack存储节点

OpenStack存储节点
  • zdc524
  • zdc524
  • 2016-01-11 18:00:46
  • 902
    个人资料
    持之以恒
    等级:
    访问量: 44万+
    积分: 4725
    排名: 7407
    最新评论