r/openstack • u/ventura120257 • Feb 16 '25
Question about cinder backend
It's a conceptual question.
When I use LVM backend, the connection to VM running in compute node is iSCSI but using NFS I couldn't create a successful configuration. How cinder assign a volume to a VM running in a remote compute node? I was reading that cinder will create a file to assign as a volume but I don't know how this file will become a block device to the VM in the compute node.
1
Upvotes
2
u/OverjoyedBanana Feb 17 '25
In your config (backend = lvm, protocol = iscsi), each cinder volume is a logical volume (LV) on the storage node, on the compte nodesi t is an scsi device attached through iscsi. The cinder config requires you to provide a volume group for it to create new LVs for bew volumes, you can see them as /dev/vg/volume-xyz. Those are then fed to the iscsi target, you can see them exported with tgt-admin --dump. Finally compute nodes attach the iscsi luns,you can see the sessions with iscsiadm -m session and the remote device appear as /dev/sdX before being mapped inside VMS.
2
u/Dabloo0oo Feb 17 '25
LVM backend Cinder creates an LV on the storage node and exports it as an iSCSI target. The compute node connects to this target via iSCSI, making it appear as a local block device, which is then attached to the VM.
NFS backend, Cinder creates a file qcow or raw on the NFS share. The compute node must mount the NFS share so that QEMU can access the file as a virtual disk. If the NFS share isn’t mounted on the compute node, the VM won’t be able to attach the volume.