Block Storage Server:

1. sudo apt-get install python-mysqldb
 
2. sudo apt-get install lvm2
 
3. 创建存储卷
sudo pvcreate /dev/sdb
sudo vgcreate cinder-volumes /dev/sdb
 
4. sudo vi /etc/lvm/lvm.conf
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
 
5. sudo apt-get install cinder-volume
 
6. sudo vi /etc/cinder/cinder.conf
[keystone_authtoken]
auth_uri = http://controller:5000
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = CINDER_PASS
[DEFAULT]
rpc_backend = rabbit
rabbit_host = controller
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = RABBIT_PASS
[database]
connection = mysql://cinder:CINDER_DBPASS@controller/cinder
[DEFAULT]
glance_host = controller
 
7. sudo service cinder-volume restart && sudo service tgt restart
 
Controller Node:
1. sudo apt-get install cinder-api cinder-scheduler
 
2. sudo vi /etc/cinder/cinder.conf
[database]
connection = mysql://cinder:CINDER_DBPASS@controller/cinder
 
3. 创建数据库
mysql -u root -p
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';
 
4. sudo -s /bin/sh -c "cinder-manage db sync" cinder
 
5. 创建用户
source admin-openrc.sh
keystone user-create --name=cinder --pass=CINDER_PASS --email=cinder@example.com
keystone user-role-add --user=cinder --tenant=service --role=admin
 
6. sudo vi /etc/cinder/cinder.conf
[keystone_authtoken]
auth_uri = http://controller:5000
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = CINDER_PASS
[DEFAULT]
rpc_backend = rabbit
rabbit_host = controller
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = RABBIT_PASS
 
7. 
keystone service-create --name=cinder --type=volume --description="OpenStack Block Storage"
keystone endpoint-create \
  --service-id=$(keystone service-list | awk '/ volume / {print $2}') \
  --publicurl=http://controller:8776/v1/%\(tenant_id\)s \
  --internalurl=http://controller:8776/v1/%\(tenant_id\)s \
  --adminurl=http://controller:8776/v1/%\(tenant_id\)s
keystone service-create --name=cinderv2 --type=volumev2 --description="OpenStack Block Storage v2"
keystone endpoint-create \
  --service-id=$(keystone service-list | awk '/ volumev2 / {print $2}') \
  --publicurl=http://controller:8776/v2/%\(tenant_id\)s \
  --internalurl=http://controller:8776/v2/%\(tenant_id\)s \
  --adminurl=http://controller:8776/v2/%\(tenant_id\)s
 
8. sudo service cinder-scheduler restart && sudo service cinder-api restart
 
Verify:
1. source demo-openrc.sh
 
2. cinder create --display-name myVolume 1
 
3. cinder list

9. Add the Block Storage service的更多相关文章

  1. OpenStack Block Storage安装配置use LVM

    1,storage systems use LVM Ins and configuration Block Storage; apt-get install lvm2; 创建Physical volu ...

  2. [Windows Azure] How to use the Windows Azure Blob Storage Service in .NET

    How to use the Windows Azure Blob Storage Service in .NET version 1.7 version 2.0 This guide will de ...

  3. Windows Azure入门教学系列 (七):使用REST API访问Storage Service

    本文是Windows Azure入门教学的第七篇文章. 本文将会介绍如何使用REST API来直接访问Storage Service. 在前三篇教学中,我们已经学习了使用Windows Azure S ...

  4. [Windows Azure] How to use the Queue Storage Service

    How to use the Queue Storage Service version 1.7 version 2.0 This guide will show you how to perform ...

  5. [Windows Azure] How to use the Table Storage Service

    How to use the Table Storage Service version 1.7 version 2.0 This guide will show you how to perform ...

  6. 对象存储服务(Object Storage Service,简称 OSS)

    阿里云对象存储服务(Object Storage Service,简称 OSS),是阿里云提供的海量.安全.低成本.高可靠的云存储服务.它具有与平台无关的RESTful API接口,能够提供99.99 ...

  7. [AWS vs Azure] 云计算里AWS和Azure的探究(6) - Amazon Simple Storage Service 和 Microsoft Azure Blob Storage

    这几天Nasuni公司出了一份报告,分析了各个云厂商的云存储的性能,包括Amazon S3,Azure Blob Storage, Google Drive, HP以及Rackspace.其中性能上A ...

  8. S3 服务(Simple Storage Service简单存储服务) 简介(与hdfs同一级)

    图1  spark 相关 亚马逊云存储之S3(Simple Storage Service简单存储服务) (转 ) S3是Simple Storage Service的缩写,即简单存储服务.亚马逊的名 ...

  9. OSS & Object Storage Service

    OSS & Object Storage Service Object Storage Service https://en.wikipedia.org/wiki/Object_storage ...

随机推荐

  1. php 字符串处理

    <?php $a = " n001|n002|n003|n004 "; //echo strlen($a);//取字符串的长度 //var_dump(strcmp(" ...

  2. 3.工厂方法模式(Factory Method)

    using System; using System.Reflection; namespace ConsoleApplication1 { class Program { static void M ...

  3. 在有EditText控件的AlertDialog对话框中自动弹出输入法

    我们先回顾一下创建AlertDialog的一般步骤. 一 inflate AlertDialog的布局文件   例如,其中dlg就是我们的布局文件.    View layout = LayoutIn ...

  4. django默认开事务的麻烦事

    最近DBA发现总是有大事务报警,最终排查到是因为django默认在查询之前执行了 set autocommit=0 原来,mysql如果开了set autocommit=0,那么所有的语句一定是在一个 ...

  5. hdu 1054 最小点覆盖

    Sample Input 4 0:(1) 1 1:(2) 2 3 2:(0) 3:(0) 5 3:(3) 1 4 2 1:(1) 0 2:(0) 0:(0) 4:(0)   Sample Output ...

  6. kinect学习笔记(三)——深度数据的提取

    一.创建Console工程 二.添加kinect引用 里面用引用,打开后 选择然后OK. 三.编写代码(有附加注释) using System; using System.Collections.Ge ...

  7. IEEE754测试-软件

    为满足硬件开发的同事验证从传感器采集到的数据是否正确,也为了方便我自己, 随手做了这个小东西,主要涉及浮点数的存储问题!

  8. Android 返回键双击退出程序

    /** * 菜单.返回键响应 */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == K ...

  9. MySql的日常管理

    连接故障恢复 MySQL套接字被误删 在UNIX系统上,本地客户以localhost为主机名建立MySQL连接,该过程是通过一个UNIX套接字文件(比如说,/tmp/mysql.sock文件)实现的. ...

  10. HTTP基础03--HTTP报文

    报文大致结构: 报文首部: 请求行(请求报文)/状态行(响应报文) 首部字段:请求和响应的各种条件和属性的各类首部: 其它(Cookie) 空行 报文主体(不是必须) 编码提升传输速率: 报文主体和实 ...