ISCSI as KVM storage backend: best practice concerning targets and LUNs per VM

iscsikvm-virtualization

I'm using an iSCSI pool as the storage backend for a couple of virtual machines and I was wondering how other people use targets and LUNs in this use-case.

I started out with one target called iqn.2016-06.iscsihost:kvmguests that has one LUN per VM. That however results in some not so ideal names for the storage target assiciated with a VM (see this question) so I was wondering if I should switch to one target per VM (with potentially a couple of LUNs per target, e.g. for separate OS disks etc.). That would have the side-effect of very neat names that can't be mixed up so easily on the KVM side of things (e.g. iqn.2016-06.iscsihost:webserver01, iqn.2016-06.iscsihost:database07, etc.) . I'm not sure what implications this would have, so any pointers are greatly appreciated.

So the question is: What's best practice here? One target with one (or multiple) LUNs per VM, or one target per VM?

Update:
Thinking about it, one has to add every iSCSI target as a storage pool to every KVM host. That is just very inconvenient since one would have to change every KVM host's configuration every time a new VM is added… Or am I missing something. How is this done in the real world?

Best Answer

I can't speak for KVM, but we're using iSCSI to connect our VMWare VSphere cluster with 4 ESXi hosts to our Dell Compellent storage system and we're simply creating datastores for approx. 4-5 VMs, currently around 2 TB per LUN. You don't want too many VMs sitting on a single iSCSI connection but you also don't want the massive administration overhead that comes with multiple LUNs per VM, especially if your environment grows beyond 4-5 VMs. The "best" setup depends on your environment, the capabilities of your storage backend (multiple controllers, load balancing etc.) and your virtualization solution.

Related Topic