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
     
[DEFAULT]
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
 
=====================
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值