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. codeforces 471B. MUH and Important Things 解题报告

    题目链接:http://codeforces.com/problemset/problem/471/B 题目意思:有 n 个 tasks,编号依次为 1 - n,每个 task 都有一定的难度值来评估 ...

  2. ssm操作控制台输出sql语句 log4j.properties

    # Configures Log4j for Tomcat and Sakai # use "A" for log in with catalina.out (actually s ...

  3. mybatis随机生成可控制主键的方式

    mybatis生成的主键,一般都是用数据库的序列,可是还有不同的写法,比如: 一.NUMBER类型的主键 <insert id="insertPeriodical" para ...

  4. dfs常见的配置文件中的value与description

    照抄于网络: name value description dfs.namenode.logging.level info The logging level for dfs namenode. Ot ...

  5. ping: unknown host www.baidu.com

    #注意有很多的DNS服务器 为了防止DDOS攻击 所以都禁止PING [root@86 ~]# ping -c 2 www.baidu.com ping: unknown host www.baidu ...

  6. IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS(转)

    转自: http://www.cnblogs.com/yipu/p/3880518.html   1.购买SSL证书,参考:http://www.cnblogs.com/yipu/p/3722135. ...

  7. hdu 2108:Shape of HDU(计算几何,判断多边形是否是凸多边形,水题)

    Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tota ...

  8. 人生维艰,何不利用开源.NET函数库让工作更轻松

    今天推荐的文章会谈到一些让你工作更轻松的开源.NET函数库. 即使业界有时候认为.NET开源社区不太健康,很多开发团队都更多依赖于微软提供的东西来开发.不过最近在.NET世界中还是诞生了一些优秀和有意 ...

  9. 【GruntMate】一个让你更方便使用Grunt的工具

    GruntMate是什么? 一个基于Grunt的项目管理可视化工具(还不知道Grunt是什么?可以谷歌一下就知道了!) GruntMate有哪些功能? 方便的管理基于Grunt的项目 方便统一管理Gr ...

  10. AngularJS 'Controller As'用法

    AngularJS 1.2版本中提供了Controller As语法,简单说就是可以在Controller中使用this来替代$scope,使得Controller更像一个传统的JS类,相对于$sco ...