一、 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. 设计模式-建造者模式(Builder)

    简介: 将一个复杂的对象的构建与它的表示分离,使得同样的构建过程创建出不同的表示. 结构图: 优点: 使得创建代码和表示代码分离,建造者隐藏了该产品是如何组装的,所以若需要改变一个产品内部的表示,只需 ...

  2. C# 处理Excel公式(一)——创建、读取Excel公式

    对于数据量较大的表格,需要计算一些特殊数值时,我们通过运用公式能有效提高我们数据处理的速度和效率,对于后期数据的增删改查等的批量操作也很方便.此外,对于某些数值的信息来源,我们也可以通过读取数据中包含 ...

  3. Excel读写

    http://www.cnblogs.com/mingforyou/archive/2013/08/26/3282922.html 读Excel代码如下: import java.io.File;im ...

  4. html/css的学习之路(1)

    HTML5简介:HTML5是什么?要回答这个问题,我们需要先了解一下HTML是什么.HTML的英文全称为Hyper Text Markup Language,即超文本标记语言.HTML5是HTML的一 ...

  5. CSS实现单行、多行文本超出部分显示省略号

     单行文本超出,代码如下: css代码: <style> .one{ width:200px; overflow: hidden; text-overflow:ellipsis; whit ...

  6. 记阿里云SLB后配置Nginx反向代理百度地图API的坑

    需求: 百度的原始请求:https://api.map.baidu.com/place/v2/suggestion?query=s&region=sc&city_limit=true& ...

  7. Python第八天 模块 包 全局变量和内置变量__name__ Python path

    Python第八天  模块   包   全局变量和内置变量__name__    Python path 目录 Pycharm使用技巧(转载) Python第一天  安装  shell  文件 Pyt ...

  8. Can't create/write to file '/tmp/MLjnvU95' (Errcode: 13 - Permission denied)

    今天一个同事反馈往一个MySQL数据库导入数据时,报"ERROR 1 (HY000): Can't create/write to file '/tmp/MLjnvU95' (Errcode ...

  9. 列表、enumerate()函数,以及查看数据类型所有的内置方法

    随便看看 """ forList(): 测试list和enumerate()函数 examineFun(): 查看数据类型所有的内置方法 ""&quo ...

  10. macos 远程 windows 10

    使用的工具:Parallels Client 免费,可以从windows store 免费下载: 只有这个最好用,希望能帮到你.和原生的windows 远程桌面功能很像: