块存储 (Block Storage):Cinder。为运行实例提供稳定的数据块存储服务,它的插件驱动架构有利于块设备的创建和管理,如创建卷、删除卷,在实例上挂载和卸载卷。自Folsom版本集成到项目中。
单独的说,假如我运行的虚拟化实例的硬盘不够了该怎么办?我们就可以使用Cinder来解决该问题。
一、我们在控制节点安装块存储服务
1. 约定: Keystone使用MySQL数据库存储相关数据,相关参数如下:
库名: cinder
账户: cinderdbadmin
密码: cinder4smtest
2. 安装块存储服务包
sudo apt-get install cinder-api cinder-scheduler
sm@controller:~$ sudo apt-get install cinder-api cinder-scheduler
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
cinder-common python-cinder python-concurrent.futures python-networkx python-taskflow
Suggested packages:
python-ceph python-hp3parclient python-scipy python-pydot
The following NEW packages will be installed:
cinder-api cinder-common cinder-scheduler python-cinder python-concurrent.futures python-networkx
python-taskflow
0 upgraded, 7 newly installed, 0 to remove and 122 not upgraded.
Need to get 1,515 kB of archives.
After this operation, 31.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
python-concurrent.futures python-networkx python-taskflow python-cinder cinder-common cinder-api
cinder-scheduler
Install these packages without verification? [y/N] y
Get:1 http://192.168.3.199/openstack/ trusty/icehouse python-concurrent.futures all 2.1.6-3 [32.8 kB]
Get:2 http://192.168.3.199/openstack/ trusty/icehouse python-networkx all 1.8.1-0ubuntu3 [506 kB]
Get:3 http://192.168.3.199/openstack/ trusty/icehouse python-taskflow all 0.1.3-0ubuntu3 [105 kB]
Get:4 http://192.168.3.199/openstack/ trusty/icehouse python-cinder all 1:2014.1.3-0ubuntu1.1 [852 kB]
Get:5 http://192.168.3.199/openstack/ trusty/icehouse cinder-common all 1:2014.1.3-0ubuntu1.1 [12.4 kB]
Get:6 http://192.168.3.199/openstack/ trusty/icehouse cinder-api all 1:2014.1.3-0ubuntu1.1 [3,434 B]
Get:7 http://192.168.3.199/openstack/ trusty/icehouse cinder-scheduler all 1:2014.1.3-0ubuntu1.1 [3,490 B]
Fetched 1,515 kB in 0s (5,286 kB/s)
Selecting previously unselected package python-concurrent.futures.
(Reading database ... 85107 files and directories currently installed.)
Preparing to unpack .../python-concurrent.futures_2.1.6-3_all.deb ...
Unpacking python-concurrent.futures (2.1.6-3) ...
Selecting previously unselected package python-networkx.
Preparing to unpack .../python-networkx_1.8.1-0ubuntu3_all.deb ...
Unpacking python-networkx (1.8.1-0ubuntu3) ...
Selecting previously unselected package python-taskflow.
Preparing to unpack .../python-taskflow_0.1.3-0ubuntu3_all.deb ...
Unpacking python-taskflow (0.1.3-0ubuntu3) ...
Selecting previously unselected package python-cinder.
Preparing to unpack .../python-cinder_1%3a2014.1.3-0ubuntu1.1_all.deb ...
Unpacking python-cinder (1:2014.1.3-0ubuntu1.1) ...
Selecting previously unselected package cinder-common.
Preparing to unpack .../cinder-common_1%3a2014.1.3-0ubuntu1.1_all.deb ...
Unpacking cinder-common (1:2014.1.3-0ubuntu1.1) ...
Selecting previously unselected package cinder-api.
Preparing to unpack .../cinder-api_1%3a2014.1.3-0ubuntu1.1_all.deb ...
Unpacking cinder-api (1:2014.1.3-0ubuntu1.1) ...
Selecting previously unselected package cinder-scheduler.
Preparing to unpack .../cinder-scheduler_1%3a2014.1.3-0ubuntu1.1_all.deb ...
Unpacking cinder-scheduler (1:2014.1.3-0ubuntu1.1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up python-concurrent.futures (2.1.6-3) ...
Setting up python-networkx (1.8.1-0ubuntu3) ...
Setting up python-taskflow (0.1.3-0ubuntu3) ...
Setting up python-cinder (1:2014.1.3-0ubuntu1.1) ...
Setting up cinder-common (1:2014.1.3-0ubuntu1.1) ...
Adding system user `cinder' (UID 117) ...
Adding new user `cinder' (UID 117) with group `cinder' ...
Not creating home directory `/var/lib/cinder'.
2015-04-26 13:44:11.786 17960 INFO migrate.versioning.api [-] 0 -> 1...
2015-04-26 13:44:11.855 17960 INFO migrate.versioning.api [-] done
2015-04-26 13:44:11.855 17960 INFO migrate.versioning.api [-] 1 -> 2...
2015-04-26 13:44:11.886 17960 INFO migrate.versioning.api [-] done
2015-04-26 13:44:11.886 17960 INFO migrate.versioning.api [-] 2 -> 3...
2015-04-26 13:44:11.898 17960 INFO migrate.versioning.api [-] done
2015-04-26 13:44:11.898 17960 INFO migrate.versioning.api [-] 3 -> 4...
2015-04-26 13:44:11.957 17960 INFO 004_volume_type_to_uuid [-] Created foreign key None
2015-04-26 13:44:11.962 17960 INFO migrate.versioning.api [-] done
2015-04-26 13:44:11.963 17960 INFO migrate.versioning.api [-] 4 -> 5...
2015-04-26 13:44:11.974 17960 INFO migrate.versioning.api [-] done
2015-04-26 13:44:11.975 17960 INFO migrate.versioning.api [-] 5 -> 6...
2015-04-26 13:44:11.987 17960 INFO migrate.versioning.api [-] done
2015-04-26 13:44:11.987 17960 INFO migrate.versioning.api [-] 6 -> 7...