关闭

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

标签: openstack解决方案私有云高可用ha
269人阅读 评论(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
0
0
查看评论
发表评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场

OpenStack Ocata 安装(九)安装块存储(cinder)

23、安装块存储服务(cinder) OpenStack Block Storage服务(cinder)将持久存储添加到虚拟机。 块存储提供用于管理卷的基础架构,并与OpenStack Compute...
  • ChenVast
  • ChenVast
  • 2017-05-05 20:10
  • 1472

对consistencygroup的一些研究和实践

consistency group,直译是一致性组,是Juno版本cinder新引进的一个概念。顾名思义,里面包含了两个意思,consistency(一致性)和group(组),如何体现的呢?处于数据...
  • canxinghen
  • canxinghen
  • 2014-11-07 16:32
  • 1991

openstack 单节点快速安装部署

安装openstack yum install -y centos-release-openstack-newton yum update -y yum install -y openstack...
  • maryhuan
  • maryhuan
  • 2017-01-04 16:19
  • 2646

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

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujianchengNova 安装软件包# yum install openstack-nova-compute ...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 09:34
  • 232

私有云落地解决方案之openstack高可用(pike版本)-架构

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng本架构借鉴redhat架构1、API 服务:包括 *-api, neutron-server,gla...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:15
  • 358

私有云落地解决方案之openstack高可用(pike版本)-neutron【ovs】

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng创建用户# openstack user create --domain default --pro...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:46
  • 286

私有云落地解决方案之openstack高可用(pike版本)-数据库

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng1、安装rpm包# yum install -y MariaDB-server MariaDB-c...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:26
  • 261

私有云落地解决方案之openstack高可用(pike版本)-nova

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng控制节点安装 创建数据库ova_api, nova, and nova_cell0 databas...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:44
  • 296

私有云落地解决方案之openstack高可用(pike版本)-haproxy

1、三个节点安装haproxy,并设置开机自动启动# yum install -y haproxy # systemctl enable haproxy2、跟rsyslog结合配置haproxy日...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-27 22:34
  • 256

私有云落地解决方案之openstack高可用(pike版本)-cinder

作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng创建用户# openstack user create --domain default --pro...
  • wylfengyujiancheng
  • wylfengyujiancheng
  • 2017-11-28 09:23
  • 206
    个人资料
    • 访问:378021次
    • 积分:4200
    • 等级:
    • 排名:第8416名
    • 原创:141篇
    • 转载:0篇
    • 译文:0篇
    • 评论:65条
    文章分类
    最新评论