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'"