[nova] local LVM volume on compute hosts

Sean Mooney smooney at redhat.com
Tue Jun 7 12:25:35 UTC 2022


On Mon, 2022-06-06 at 15:11 +0000, Paul Harrison wrote:
> I have installed a small test cluster using openstack-ansible (xena) and would like to use local LVM volumes for storing instance volumes -  and following https://docs.openstack.org/nova/latest/configuration/config.html and (e.g. https://cloudnull.io/2017/12/nova-lvm-an-iop-love-story/) I have the libvirt section of my /etc/nova/nova.conf as below.
> 
> -8<---
> [libvirt]
> inject_partition = -2
> inject_password = False
> inject_key = False
> virt_type = kvm
> live_migration_with_native_tls = true
> live_migration_scheme = tls
> live_migration_inbound_addr = 172.29.236.5
> hw_disk_discard = ignore
> disk_cachemodes = none
> images_type = lvm
> images_volume_group = nova
> volume_clear = zero
> -8<——
> 
> however, the nova service continues to use cinder volumes from my storage host to store instances. Is there something else that needs to be configured to make this work, or is it obsolete?
no there is noting else you need to configure but this option is not what you think it is.
the images_type option contols what storage will be used for all non cinder storage.
i.e. vms that are booted with out usign a boot volume.

by default i belive we woudl use qcow or raw files on disk
with images_type=lvm we will instead create a lvm volume for the root disk but only if you do not use the boot form volume workflow.

there is no way curretnly to prevent usign boot form volume on a specific host and force only local storage directly via config.

you can do this indirectly but with sideffect.

effectivly if you have a set of hosts that cant or should  not have acess to cinder you can create a spereate avaiablity zone.
you would then set [cinder]/cross_az_attch=false. e.g. create local-only az and if the cinder backend is configured to be in a differnt az then
the cross_az_attach config will prevent the vm form booting in the local-only az.
https://docs.openstack.org/nova/latest/configuration/config.html#cinder.cross_az_attach


so your current config will make any non boot from volume nova instance use lvm storage to provision the vm root/swap/epmeral disks
but will not prevent end users requesting cinder data voluems or boot volumes via the cli/api. if the opt in to cinder stoage that
is what they will recive but if they use teh default storage provided by the flaovr then it will be local.

> 
> 
> 




More information about the openstack-discuss mailing list