Redhat 6.3 openstack的cinder安装配置
cinder 配置 安装:1) 下载source code
2) pip install
3) yum install scsi-target-utils
4) yum install iscsi-initiator-utils.x86_64 (这两个相当于ubuntu下的 open-iscsi和tgt)
5) edit cinder config file:/etc/cinder/cinder.conf
sql_connection = mysql://cinder:password@localhost:3306/cinder
rabbit_password = password
normally it includes :
1.database config
2.keystone access config
3.volumes config
4.message queue config
5. enable cinder api in nova.conf
enabled_apis=osapi_volume
osapi_volume_listen=0.0.0.0 #cinder server ip
osapi_volume_listen_port=8776
6) edit
/etc/lvm/lvm.conf
Add volume_list entry to /etc/lvm/lvm.conf to keep LVM from activating logical volumes created in VMs.
volume_list = ["VolGroup", "cinder-volumes" ]
volume_list should include your os related volume group.
附:
Volume Group: Any number of physical volumes or PV on different disk drives
can be added together into a volume group (VG).
1)Create Volume Group VG1 with two Physical Volumes
#vgcreate VG1 /dev/hda# /dev/hda#
2)Change Volume Group to ACTIVE(optional)
#vgchange -a y VG1
3)查看现有的volume group
# vgdisplay
4)扩展现有的vg
#vgextend VolGroup00 /dev/sda3
Volume group "VolGroup00" successfully extended
5)For Short details output of Volume group
#vgscan
7)add volumes dir in /etc/tgt/targets.conf
执行命令:
sed -i '9a include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf
8) restart tgtd service
执行 : service tgtd restart
9) init cinder db
mysql -uroot -ppassword -e 'create database cinder'
mysql -uroot -ppassword -e "grant select,insert,update,delete,create,alter,drop,index on cinder.* to cinder@'localhost' identified by 'cinder'"
cinder-manage db sync
10) test if cinder works
10.1 create one test loop file and mount it
dd if=/dev/zero of=cinder-volumes bs=1 count=0 seek=2G
losetup /dev/loop2 cinder-volumes
10.2 init pv and create vg
pvcreate /dev/loop2
vgcreate cinder-volumes /dev/loop2
10.3 check if volume is created
pvscan
10.4 restart cinder service:
cinder api, scheduler, volume
#service openstack-cinder-api restart 或者 /etc/init.d/openstack-cinder-api restart
#service openstack-cinder-scheduler restart 或者 /etc/init.d/openstack-cinder-scheduler restart
#service openstack-cinder-volume restart 或者 /etc/init.d/openstack-cinder-volume restart
10.5 use cinder to create volume
cinder create --display_name test 1
10.6 verify volume created successfully
cinder list
volume should in "available" statu
=====================
cinder命令学习:http://www.cnblogs.com/youjianxiaoxiang/archive/2012/12/18/2823511.html
Openstack之Cinder服务初探: http://blog.csdn.net/luo_brian/article/details/8592692
openstack Grizzly-g3单节点安装:http://longgeek.com/2013/03/11/openstack-grizzly-g3-for-ubuntu-12-04-all-in-one-installation/#Cinder
Ubuntu12.04.2 OpenStack Grizzly 安装(Bridge)http://www.chenshake.com/ubuntu12-04-2-installed-openstack-grizzly-bridge-mode/
Cinder几个错误和解决办法:http://www.xiaoyinzei.com/?p=520
http://www.open-open.com/lib/view/open1342256392776.html
页:
[1]