I read in the XenServer Administrator's Guide in section 4.1.6.2 that you can map raw LUNs to VDIs if you're using a NetApp or EqualLogic SAN. Is it possible to do the same with Software iSCSI SANs (i.e. using a Nexenta/ZFS-based SAN as the iSCSI target)? I know I could setup an iSCSI SR and put VDIs on there, but I'd like to avoid it since I'd otherwise have to deal with the overhead of LVM, plus it'd make cloning more difficult. I'd handle the snapshotting and cloning from the SAN. So I'm basically just wanting to use a one-LUN-per-VDI mapping, without involving LVM inside the XenServer host.
I'm not opposed to setting this up through the CLI if necessary. I'd prefer something reliable that will persist across reboots of the XenServer host, but if I have to script something that will initialize the iSCSI sessions before the VMs start and the VDIs are loaded, I'm OK with that.
Figured it out. There is an undocumented "iscsi" SR driver that will create a LUN-per-VDI SR (I found this when looking through the /opt/xensource/sm directory - see the ISCSISR.py file). You can only set this up through the command-line, including creating the VBDs and attaching it to VMs. The VBDs and VDIs don't even show up in XenCenter.
Here's a sample command to set it up:
This will automatically create an VDI for each iSCSI LUN. If you end up adding a new iSCSI LUN on the SAN, XenServer will add a new VDI for it after executing the following command:
Also, if you end up resizing a LUN, XenServer does not automatically pick up on that, so you'd have to execute the following:
And to create a VBD and attach it to a VM: