OpenStack--部署块存储cinder

通过 cinder 使用 lvm 卷提供后端存储:
官方部署文档:https://docs.openstack.org/ocata/zh_CN/install-guide-rdo/cinder.html

1、数据库准备:
#1:创建数据库并授权:
[root@linux-host5 ~]# mysql -uroot –p
MariaDB [(none)]> CREATE DATABASE cinder;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder123';
MariaDB [(none)]> flush privileges;

#2:控制端验证数据访问:
[root@linux-host1 ~]# mysql -ucinder -h192.168.10.100 -pcinder123
2、控制端 cinder 服务注册:
#1:创建 cinder 用户并授权:
[root@linux-host1 ~]# source admin-ocata.sh 
[root@linux-host1 ~]# openstack user create --domain default --password-prompt cinder
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | 81672c29064942aea8fb754820ddb76a |
| enabled | True |
| id | f12af1d5583e4b179354c3b4d8d0d778 |
| name | cinder |
| options | {
   
   } |
| password_expires_at | None | +---------------------+----------------------------------+ #授权 admin 权限
[root@linux-host1 ~]# openstack role add --project service --user cinder admin

#2:创建服务: #v2 版本
[root@linux-host1 ~]# openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Block Storage |
| enabled | True |
| id | 8077b7de84fc4b32a288306459bad10b |
| name | cinderv2 |
| type | volumev2 |
+-------------+----------------------------------+ #v3 版本
[root@linux-host1 ~]# openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Block Storage |
| enabled | True |
| id | 4234b69629ac4e6bbabcd72c8bb0ab81 |
| name | cinderv3 |
| type | volumev3 | +-------------+----------------------------------+

#3:注册 V2 版本 endpoint: #公共端点:
[root@linux-host1 ~]# openstack endpoint create --region RegionOne volumev2 public http://192.168.10.100:8776/v2/%\(project_id\)s
+--------------+----------------------------------------------+
| Field 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值