一、 base节点配置

mysql -u root -proot

CREATE DATABASE cinder;

GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'CINDER_DBPASS';

GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'CINDER_DBPASS';

二、 ctrl控制节点配置

#运行环境变量

. admin-openrc

#创建cinder用户并添加角色为admin

openstack user create --domain default --password CINDER_PASS cinder

openstack role add --project service --user cinder admin

#创建cinder和cinderv2服务

openstack service create --name cinder --description "OpenStack Block Storage" volume

openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2

#创建cinder和cinderv2服务站点

openstack endpoint create --region RegionOne volume public http://ctrl.test.com:8776/v1/%\(project_id\)s

openstack endpoint create --region RegionOne volume internal http://ctrl.test.com:8776/v1/%\(project_id\)s

openstack endpoint create --region RegionOne volume admin http://ctrl.test.com:8776/v1/%\(project_id\)s

openstack endpoint create --region RegionOne volumev2 public http://ctrl.test.com:8776/v2/%\(project_id\)s

openstack endpoint create --region RegionOne volumev2 internal http://ctrl.test.com:8776/v2/%\(project_id\)s

openstack endpoint create --region RegionOne volumev2 admin http://ctrl.test.com:8776/v2/%\(project_id\)s

#安装cinder软件并编辑cinder配置文件

yum install openstack-cinder -y

vim /etc/cinder/cinder.conf

[database]
connection = mysql+pymysql://cinder:CINDER_DBPASS@base.test.com/cinder [DEFAULT]
transport_url = rabbit://openstack:RABBIT_PASS@base.test.com
auth_strategy = keystone
my_ip = 172.16.2.52 [keystone_authtoken]
auth_uri = http://ctrl.test.com:5000
auth_url = http://ctrl.test.com:35357
memcached_servers = base.test.com:
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = cinder
password = CINDER_PASS [oslo_concurrency]
lock_path = /var/lib/cinder/tmp 

#填充数据库

su -s /bin/sh -c "cinder-manage db sync" cinder

#编辑Nova配置文件

vim /etc/nova/nova.conf

[cinder]
os_region_name = RegionOne

#启动服务

systemctl restart openstack-nova-api.service

systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service

systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service

systemctl status openstack-cinder-api.service openstack-cinder-scheduler.service

#验证

. admin-openrc

openstack volume service list

三、 cinder节点配置

#安装软件

yum install lvm2  -y

#启动lvm2服务

systemctl restart lvm2-lvmetad.service

systemctl enable lvm2-lvmetad.service

systemctl status lvm2-lvmetad.service

#创建VG

pvcreate /dev/vdb

vgcreate cinder-volumes /dev/vdb

#编辑lvm配置文件

vim /etc/lvm/lvm.conf

devices {
filter = [ "a/vda/", "a/vdb/", "r/.*/"]

#安装cinder软件并编辑配置文件

yum install openstack-cinder targetcli python-keystone -y

vim /etc/cinder/cinder.conf

[database]
connection = mysql+pymysql://cinder:CINDER_DBPASS@base.test.com/cinder [DEFAULT]
transport_url = rabbit://openstack:RABBIT_PASS@base.test.com
auth_strategy = keystone
my_ip = 172.16.2.54
enabled_backends = lvm
glance_api_servers = http://ctrl.test.com:9292 [keystone_authtoken]
auth_uri = http://ctrl.test.com:5000
auth_url = http://ctrl.test.com:35357
memcached_servers = base.test.com:
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = cinder
password = CINDER_PASS [lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = lioadm [oslo_concurrency]
lock_path = /var/lib/cinder/tmp

#启动cinder服务

systemctl restart openstack-cinder-volume.service target.service

systemctl enable openstack-cinder-volume.service target.service

systemctl status openstack-cinder-volume.service target.service

openstack搭建之-cinder配置(12)的更多相关文章

  1. openstack搭建之-neutron配置(11)

    一.base节点设置 mysql -u root -proot CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO 'neutr ...

  2. openstack搭建之-nova配置(10)

    一. base节点设置数据库 mysql -u root -proot CREATE DATABASE nova_api; CREATE DATABASE nova; CREATE DATABASE ...

  3. openstack搭建之-glance配置(9)

    一. base节点配置 #设置数据库,创建glance数据库,并设置权限 mysql -u root -proot CREATE DATABASE glance; GRANT ALL PRIVILEG ...

  4. openstack搭建之-keystone配置(8)

    一. Base Node配置 mysql -uroot -proot CREATE DATABASE keystone GRANT ALL PRIVILEGES ON keystone.* to 'k ...

  5. openstack搭建之-horizon配置(14)

    一.ctrl控制节点安装horizon #安装软件yum install openstack-dashboard -y vim /etc/openstack-dashboard/local_setti ...

  6. OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(三)——计算节点的安装

    序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 计算节点: 1.准备结点 安装好ubuntu 12.04 Server 64bits后,进入ro ...

  7. OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(一)——控制节点的安装

      序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 控制节点: 1.准备Ubuntu 安装好Ubuntu12.04 server 64bits后 ...

  8. OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】——序

    OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE](一)——控制节点的安装 OpenStack Havana 部署在Ubuntu 12.04 Serve ...

  9. linux云计算(keystone swift cinder配置)

    独立安装openstack组件 准备服务器,为安装openstack的服务器加3块额外硬盘 qemu-img create -f qcow2 rh71.img 20G qemu-img create ...

随机推荐

  1. RESTful杂记

    在网上找了许久的关于REST的资料,发现网上大部分都是说的比较片面,虽然有部分说出了本质,但也没有详细提出,所以在这里记录一下. RESTful是什么 首先,维基百科是这样说的: 表现层状态转换(RE ...

  2. Dapper, 批量插入,批量更新, 以及in, like

    1. 批量插入 public async Task CreateBusinessItemAsync(IEnumerable<BusinessItemsEntity> businessIte ...

  3. 关于Android使用SFTP上传文件报错问题

    错误报告java.lang.NoClassDefFoundError:Failed resolution of: Lorg/ietf/jgss/Oid; 问题是由于 Lorg.ietf. jgss.O ...

  4. HTTPS 站点的性能优化

    HTTPS 站中的几大难题 性能,包括: HTTPS需要多次握手,因此网络耗时变长,用户从HTTP跳转到HTTPS需要一些时间: HTTPS要做RSA校验,这会影响到设备性能: 所有CDN节点要支持H ...

  5. js cookie存取

    if(getCookie('guide') == 'true'){ window.location.href='' } else { setCookie('guide','true'); } func ...

  6. Python开发爬虫之静态网页抓取篇:爬取“豆瓣电影 Top 250”电影数据

    所谓静态页面是指纯粹的HTML格式的页面,这样的页面在浏览器中展示的内容都在HTML源码中. 目标:爬取豆瓣电影TOP250的所有电影名称,网址为:https://movie.douban.com/t ...

  7. 更新下载库update绝对详解

    下载更新apk,基本上每个app都需要的功能,来看看吧,肯定有你想要的,以前都是自己写,近期想借助第三方的一个库来做,功能齐全,感觉不错,记录使用过程,虽然官方也有使用教程,不过毕竟粗略,网上也能搜到 ...

  8. C#设置电脑时间帮助类

    using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using S ...

  9. Python使用Plotly绘图工具,绘制散点图、线形图

    今天在研究Plotly绘制散点图的方法 使用Python3.6 + Plotly Plotly版本2.0.0 在开始之前先说说,还需要安装库Numpy,安装方法在我的另一篇博客中有写到:https:/ ...

  10. Anaconda安装sasl,thrift,thrift-sasl,PyHive连接Hive

    一.安装sasl 安装失败,前往:https://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl下载对应自己python版本的sasl 本地安装: 二.安装thrif ...