一 创建一个新的虚拟机作为存储节点
1 部署图
二 控制节点
1 安装cinder
[root@controller0 ~]# yum install openstack-cinder -y
2 修改hosts
[root@controller0 ~]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost
10.20.0.10 controller0
10.20.0.20 network0
10.20.0.30 compute0
10.20.0.40 cinder0
3 配置cinder数据库连接
[root@controller0 ~]# openstack-config --set /etc/cinder/cinder.conf database connection mysql://cinder:openstack@controller0/cinder
4 初始化数据库
[root@controller0 ~]# openstack-db --init --service cinder --password openstack
Please enter the password for the 'root' MySQL user:
Verified connectivity to MySQL.
Creating 'cinder' database.
Updating 'cinder' database password in /etc/cinder/cinder.conf
Initializing the cinder database, please wait...
Complete!
5 在keystone中创建cinder系统用户
[root@controller0 ~]# keystone user-create --name=cinder --pass=cinder --email=cinder@example.com
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | cinder@example.com |
| enabled | True |
| id | 3226dd887b8b46f78f43bc64abb729c3 |
| name | cinder |
| username | cinder |
+----------+----------------------------------+
[root@controller0 ~]# keystone user-role-add --user=cinder --tenant=service --role=admin
6 在keystone中注册一个cinder的service
[root@controller0 ~]# keystone service-create --name=cinder --type=volume --description="OpenStack Block Storage"
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | OpenStack Block Storage |
| enabled | True |
| id | 6897f2a2184049fa87d75252b1d27e1b |
| name | cinder |
| type | volume |
+-------------&#