cinder块存储配置使用lvm

cinder基于lvm插件实现。生产环境中,一般使用系统盘外的其它磁盘。

【packstack安装openstack的场合】
1,删除原有的卷。
vgremove cinder-volumes (packstack安装openstack时,原有的创建在系统盘sda上,比较小)
2, 创建 pv。
pvcreate /dev/sdxx #sdxx 为要准备作为cinder后端存储的硬盘,如 sdb sdc .....
3,创建 vgcreate cinder-volumes /dev/sdxx,(默认的名字,你可以自定义,但是需要把配置⽂件的 cinder-volumes 改成你的自定义名称)
※cinder-volumes为packstack安装openstack时,生成的卷组名称。
4,重启相关的服务。
systemctl restart openstack-cinder-volume #不需要修改lvm.conf的操作。

【手动安装openstack】
(4),cinder配置lvm存储的步骤如下:
★cinder.conf 增加[lvm]
volume_backend_name=lvm
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver //后端驱动
iscsi_ip_address=192.168.2.20 //存储节点的地址
iscsi_helper=lioadm
volume_group=cinder-volumes //使用的vg卷名字 按照自⼰的配置进⾏修改
volumes_dir=/var/lib/cinder/volumes
systemctl restart openstack-cinder-volume

原文地址:https://www.cnblogs.com/mountain2011/p/11450613.html