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. DP:Making the Grade(POJ 3666)

     聪明的修路方案 题目大意:就是农夫要修一条路,现在要求这条路要么就是上升的,要么就是下降的,总代价为∑|a[i]-b[i]|,求代价最低的修路方案, (0 ≤ β≤ 1,000,000,000) , ...

  2. Http协议之Get和Post的区别

    get(默认值)是通过URL传递表单值,post传递的表单值是隐藏到http报文体中,url中看不到.区别(常考):get是通过url传递表单值,post通过url看不到表单域的值:get传递的数据量 ...

  3. 使用webstorm调试node程序

    前言 相信大家接触过不少node代码了,如果你应用的比较初级或者针对你的项目不需要接触过深的node代码,也许你仅仅需要简单的console.log('your variable')就完全满足你的需要 ...

  4. Android源码编译

    参考百度文章: http://jingyan.baidu.com/article/a501d80ce61ad0ec630f5e0b.html

  5. iOS开发网络篇—GET请求和POST请求(转)

    一.GET请求和POST请求简单说明 创建GET请求 1 // 1.设置请求路径 2 NSString *urlStr=[NSString stringWithFormat:@"http:/ ...

  6. freopen()——重定向标准输入输出流

    freopen()——重定向标准输入输出流 头文件:stdio.h 函数原型:FILE * freopen(const char *filename , const char *type ,  FIL ...

  7. C#控制管理VisualSVN Server

    VisualSVN Server可以用WMI接口管理(Windows Management Instrumentation). VisualSVN Server安装的计算机中,位于%VISUALSVN ...

  8. ML 04、模型评估与模型选择

    机器学习算法 原理.实现与实践——模型评估与模型选择 1. 训练误差与测试误差 机器学习的目的是使学习到的模型不仅对已知数据而且对未知数据都能有很好的预测能力. 假设学习到的模型是$Y = \hat{ ...

  9. html和text的区别

    1.html <div id="divShow"><b><i>Write Less Do More</i></b>< ...

  10. DP+路径 URAL 1029 Ministry

    题目传送门 /* 题意:就是从上到下,找到最短路,输出路径 DP+路径:状态转移方程:dp[i][j] = min (dp[i-1][j], dp[i][j-1], dp[i][j+1]) + a[[ ...