码迷,mamicode.com
首页 > 其他好文 > 详细

openstack cinder lvm配置

时间:2019-10-30 16:43:32      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:openstac   get   ||   ice   python   nbsp   meta   bak   pre   

openstack cinder lvm配置

############
yum install lvm2 -y
systemctl enable lvm2-lvmetad.service
systemctl restart lvm2-lvmetad.service   


yes |pvcreate /dev/sdb
yes |vgcreate vg_sdb /dev/sdb

\cp -f /etc/lvm/lvm.conf{,.bak}

####如果系统是lvm分区 sda
sed -i /devices {/ a filter = [ "a/sda/","a/sdb/", "r/.*/"] /etc/lvm/lvm.conf 
grep devices { -C 3 /etc/lvm/lvm.conf



##
yum install openstack-cinder targetcli python-oslo-policy -y


systemctl enable openstack-cinder-volume.service target.service
systemctl restart openstack-cinder-volume.service target.service

echo "
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = vg_sdb
iscsi_protocol = iscsi
iscsi_helper = lioadm
volume_backend_name = lvm 
" >>/etc/cinder/cinder.conf
tail /etc/cinder/cinder.conf

[ $(grep -c ^enabled_backends /etc/cinder/cinder.conf) -eq 0 ] && sed -i s/\[DEFAULT\]/ a enabled_backends=lvm/g /etc/cinder/cinder.conf || sed -i s/^enabled_backends.*=/enabled_backends=lvm,/g /etc/cinder/cinder.conf

grep enabled_backends /etc/cinder/cinder.conf


systemctl enable openstack-cinder-volume.service target.service

 

openstack cinder lvm配置

标签:openstac   get   ||   ice   python   nbsp   meta   bak   pre   

原文地址:https://www.cnblogs.com/blog-lhong/p/11765422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!