ceph集成openstack cinder
yum install -y ceph-common
|
[root@controller2 etc]# cd ceph/
[root@controller2 ceph]# ls -ls
总用量 4
4 -rwxr-xr-x. 1 root root 2910 10月 31 2018 rbdmap
|
ceph osd pool create volumes 128
ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=volumes-cache, allow rwx pool=vms, allow rwx pool=vms-cache, allow rx pool=images, allow rx pool=images-cache'
[client.cinder]
key = AQCuYipewZ4IOhAArwkoAs8BxEAnxF1MAHIn8g==
ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=images
[client.cinder]
key = AQAVdm5dojfsLxAAAtt+eX7psQC7pXpisqsvBg==
|
[root@ceph1 ceph]# ceph auth get-or-create client.glance | ssh controller2 tee /etc/ceph/ceph.client.glance.keyring
root@172.16.3.71's password:
[client.glance]
key = AQAVdm5dojfsLxAAAtt+eX7psQC7pXpisqsvBg==
[root@ceph1 ceph]# ceph auth get-or-create client.cinder | ssh controller2 tee /etc/ceph/ceph.client.cinder.keyring
root@172.16.3.71's password:
[client.cinder]
key = AQDOdW5do2jzEhAA/v/VYEBHOUk440mpP6GMBg==
|
[root@ceph1 ceph]# ceph auth get-or-create client.cinder | ssh compute1 tee /etc/ceph/ceph.client.cinder.keyring
root@172.16.3.72's password:
[client.cinder]
key = AQDOdW5do2jzEhAA/v/VYEBHOUk440mpP6GMBg==
[root@ceph1 ceph]# ceph auth get-key client.cinder | ssh compute1 tee client.cinder.key
root@172.16.3.72's password:
AQDOdW5do2jzEhAA/v/VYEBHOUk440mpP6GMBg==[root@ceph1 ceph]#
|
[root@ceph1 ceph]# ceph auth get-key client.cinder | ssh compute1 tee client.cinder.key
root@172.16.3.72's password:
AQDOdW5do2jzEhAA/v/VYEBHOUk440mpP6GMBg==
|
[root@compute1 ceph]# uuidgen
35bbf774-17df-407d-8b52-45bf93269b9a
[root@compute1 ~]# cat > secret.xml <<EOF
> <secret ephemeral='no' private='no'>
> <uuid>35bbf774-17df-407d-8b52-45bf93269b9a</uuid>
> <usage type='ceph'>
> <name>client.cinder secret</name>
> </usage>
> </secret>
> EOF
[root@compute1 ~]# virsh secret-define --file secret.xml
生成 secret 35bbf774-17df-407d-8b52-45bf93269b9a
[root@compute1 ~]# virsh secret-set-value --secret 35bbf774-17df-407d-8b52-45bf93269b9a --base64 $(cat client.cinder.key)
secret 值设定
|
scp /etc/ceph/ceph.conf root@controller2:/etc/ceph/
scp /etc/ceph/ceph.conf root@compute1:/etc/ceph/
|
[root@controller2 ~]# cat /etc/ceph/ceph.conf
[global]
fsid = 6bbab2f3-f90c-439d-86d7-9c0f3603303c
mon_initial_members = ceph1, ceph2, ceph3
mon_host = 172.16.3.61,172.16.3.62,172.16.3.63
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
mon clock drift allowed = 10
mon clock drift warn backoff = 30
osd pool default pg num = 64
osd pool default pgp num = 64
osd_crush_update_on_start = false
|
[DEFAULT]
enabled_backends = lvm,rbd-1
glance_api_version = 2
[lvm]
volume_backend_name = lvm
[rbd-1]
volume_driver = cinder.volume.drivers.rbd.RBDDriver
volume_backend_name = rbd-1
rbd_pool = volumes
rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot = false
rbd_max_clone_depth = 5
rbd_store_chunk_size = 4
rados_connect_timeout = 5
rbd_user = cinder
rbd_secret_uuid = 35bbf774-17df-407d-8b52-45bf93269b9a
report_discard_supported = True
image_upload_use_cinder_backend = False
|
[root@controller2 ~]# cat /etc/cinder/cinder.conf
#wangjx
[DEFAULT]
transport_url = rabbit://openstack:21vianet@controller2
auth_strategy = keystone
my_ip = 10.160.20.22
enabled_backends = lvm,rbd-1
glance_api_version = 2
glance_api_servers = http://controller2:9292
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = lioadm
volume_backend_name = lvm
[rbd-1]
volume_driver = cinder.volume.drivers.rbd.RBDDriver
volume_backend_name = rbd-1
rbd_pool = volumes
rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot = false
rbd_max_clone_depth = 5
rbd_store_chunk_size = 4
rados_connect_timeout = 5
rbd_user = cinder
rbd_secret_uuid = 35bbf774-17df-407d-8b52-45bf93269b9a
report_discard_supported = True
image_upload_use_cinder_backend = False
[backend]
[backend_defaults]
[barbican]
[brcd_fabric_example]
[cisco_fabric_example]
[coordination]
[cors]
[database]
connection = mysql+pymysql://cinder:21vianet@controller2/cinder
[fc-zone-manager]
[healthcheck]
[key_manager]
[keystone_authtoken]
auth_uri = http://controller2:5000
auth_url = http://controller2:5000
memcached_servers = controller2:11211
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = cinder
password = 21vianet
[matchmaker_redis]
[nova]
[oslo_concurrency]
lock_path = /var/lib/cinder/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[oslo_reports]
[oslo_versionedobjects]
[profiler]
[sample_remote_file_source]
[service_user]
[ssl]
[vault]
|
[root@controller2 ceph]# cinder type-create ceph1
+--------------------------------------+-------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+-------+-------------+-----------+
| 7932f657-87a1-495b-ac24-4308197f51e4 | ceph1 | - | True |
+--------------------------------------+-------+-------------+-----------+
[root@controller2 ceph]# cinder type-key ceph1 set volume_backend_name=rbd-1
|
[root@controller2 ceph]# openstack volume type list
+--------------------------------------+-------+-----------+
| ID | Name | Is Public |
+--------------------------------------+-------+-----------+
| 7932f657-87a1-495b-ac24-4308197f51e4 | ceph1 | True |
+--------------------------------------+-------+-----------+
[root@controller2 ceph]# openstack volume type show ceph1
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| access_project_ids | None |
| description | None |
| id | 7932f657-87a1-495b-ac24-4308197f51e4 |
| is_public | True |
| name | ceph1 |
| properties | volume_backend_name='rbd-1' |
| qos_specs_id | None |
+--------------------+--------------------------------------+
|
[root@controller2 ceph]# openstack volume create disk0205ceph1 --type ceph1 --size 1
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2020-02-05T12:10:10.000000 |
| description | None |
| encrypted | False |
| id | 6043b12f-6b7e-4256-a095-ede1d019d501 |
| migration_status | None |
| multiattach | False |
| name | disk0205ceph1 |
| properties | |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| type | ceph1 |
| updated_at | None |
| user_id | ccd5b0f0d5534366b27ae4fab3a82945 |
+---------------------+--------------------------------------+
[root@controller2 ceph]# openstack volume list
+--------------------------------------+---------------+-----------+------+------------------------------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+---------------+-----------+------+------------------------------------+
| 6043b12f-6b7e-4256-a095-ede1d019d501 | disk0205ceph1 | available | 1 | |
| 2f9f4c64-ded8-4ff0-b2b2-94319a60e8d4 | disk0205 | in-use | 1 | Attached to vm0205lvm on /dev/vda |
+--------------------------------------+---------------+-----------+------+------------------------------------+
|
ceph集成openstack cinder的更多相关文章
- 理解 OpenStack + Ceph (5):OpenStack 与 Ceph 之间的集成 [OpenStack Integration with Ceph]
理解 OpenStack + Ceph 系列文章: (1)安装和部署 (2)Ceph RBD 接口和工具 (3)Ceph 物理和逻辑结构 (4)Ceph 的基础数据结构 (5)Ceph 与 OpenS ...
- openstack pike与ceph集成
openstack pike与ceph集成 Ceph luminous 安装配置 http://www.cnblogs.com/elvi/p/7897178.html openstack pike 集 ...
- Ceph和Openstack的cinder模块对接方法
1.创建存储池 在ceph节点中执行如下语句. #ceph osd pool create volumes 2.配置 OPENSTACK 的 CEPH 客户端 在ceph节点两次执行如下语句,两次{y ...
- OpenStack Cinder 与各种后端存储技术的集成叙述与实践
先说下下loop设备 loop设备及losetup命令介绍 1. loop设备介绍 在类 UNIX 系统里,loop 设备是一种伪设备(pseudo-device),或者也可以说是仿真设备.它能使我们 ...
- ceph与openstack对接(cinder、glance、nova)
对接分为三种,也就是存储为openstack提供的三类功能1.云盘,就好比我们新加的硬盘2.原本的镜像也放在ceph里,但是我没有选择这种方式,原因是因为后期有要求,但是我会把这个也写出来,大家自己对 ...
- 云计算/云存储---Ceph和Openstack的cinder模块对接方法
1.创建存储池 在ceph节点中执行如下语句. #ceph osd pool create volumes 2.配置 OPENSTACK 的 CEPH 客户端 在ceph节点两次执行如下语句,两次{y ...
- “CEPH浅析”系列之六——CEPH与OPENSTACK
在 <"Ceph浅析"系列之二--Ceph概况>中即已提到,关注Ceph的原因之一,就是OpenStack社区对于Ceph的重视.因此,本文将对Ceph在OpenSta ...
- OpenStack Cinder源代码流程简析
版权声明:本博客欢迎转载,转载时请以超链接形式标明文章原始出处!谢谢! 博客地址:http://blog.csdn.net/i_chips 一.概况 OpenStack的各个模块都有对应的client ...
- Ceph在OpenStack中的地位
对Ceph在OpenStack中的价值进行简要介绍,并且对Ceph和Swift进行对比. 对于一个IaaS系统,涉及到存储的部分主要是块存储服务模块.对象存储服务模块.镜像管理模块和计算服务模块.具体 ...
随机推荐
- 关于zabbix利用snmp协议从交换机获取的端口带宽数据的概念问题
关于zabbix利用snmp协议从交换机获取的端口带宽数据的概念问题:使用端口OID号获得的数据实际是即时的端口总数据量,而在计算带宽时,需要选择一个时间段,在时间段的结束点获得的总数据量减去在时间段 ...
- Chisel3 - Tutorial - Tbl
https://mp.weixin.qq.com/s/e8vJ8claauBtiuedxYYaJw 实现可以动态索引的表. 参考链接: https://github.com/ucb-bar/c ...
- css背景图定位和浮动
网站图标引入:<link rel="shortcut icon" href="ico图标地址"> 背景图片 background-image: u ...
- 利用init进程监控底层节点的方法架构
native层利用底层节点变化,再针对变化进行相应的函数调用,实现某些功能. 架构如下: 底层提供节点更新,以及healthd读取节点的实现,都比较简单.而其余部分比较关键. 特别注意init监控pr ...
- Java实现 蓝桥杯 算法训练 画图(暴力)
试题 算法训练 画图 问题描述 在一个定义了直角坐标系的纸上,画一个(x1,y1)到(x2,y2)的矩形指将横坐标范围从x1到x2,纵坐标范围从y1到y2之间的区域涂上颜色. 下图给出了一个画了两个矩 ...
- Java实现 LeetCode 732 我的日程安排表 III(暴力 || 二叉树)
732. 我的日程安排表 III 实现一个 MyCalendar 类来存放你的日程安排,你可以一直添加新的日程安排. MyCalendar 有一个 book(int start, int end)方法 ...
- Java实现 蓝桥杯VIP 基础练习 Sine之舞
问题描述 最近FJ为他的奶牛们开设了数学分析课,FJ知道若要学好这门课,必须有一个好的三角函数基本功.所以他准备和奶牛们做一个"Sine之舞"的游戏,寓教于乐,提高奶牛们的计算能力 ...
- 第四届蓝桥杯JavaB组省赛真题
解题代码部分来自网友,如果有不对的地方,欢迎各位大佬评论 题目1.世纪末星期 题目描述 曾有邪教称1999年12月31日是世界末日.当然该谣言已经不攻自破. 还有人称今后的某个世纪末的12月31日,如 ...
- Java实现 洛谷 P1046 陶陶摘苹果
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = ...
- Java实现有理数的循环节
1/7 = 0.142857142- 是个无限循环小数. 任何有理数都可以表示为无限循环小数的形式. 本题目要求即是:给出一个数字的循环小数表示法. 例如: 输入: 1,5 则输出: 0.2 输入: ...