As I have started on the storage with the last article I can continue with another interesting topic, which comes up quite often: "I already have an existing NAS/SAN. How can I combine this with Sun VDI 3 connecting to VirtualBox?"

ZFS is the filesystem that is used in combination with VirtualBox, as introduced in various blog entries and in the Sun VDI documentation. ZFS is included in Solaris 10 or OpenSolaris. It is also the foundation of the Sun Unified Storage. ZFS manages the physical storage attached to a server, but it is also capable of managing remote storage, e.g. through the iSCSI protocol. In the following I want to quickly demonstrate how this could be done:

Assuming you have a LUN and want to use it with VDI 3. And you have a spare Solaris 10U7 or OpenSolaris box. This can also be a box that you are using for VDI 3, but keep in mind, that you need RAM for utilizing external storage. Instrumental for linking the LUN into the ZFS filesystem is the iSCSI initiator:

  1. First thing is to tell the iSCSI initiator to accept static iSCSI connections:
    iscsiadm modify discovery --static enable
  2. Thereafter you can connect the initiator with your LUN. This can be done through providing the IQN of the LUN and the IP of the external storage host:
    iscsiadm add static-config IQN,IP
  3. Next step is to list the new iSCSI target linked into the system
    iscsiadm list target -S
    The output list a number of things among the last line is most important:
    OS Device Name: /dev/rdsk/c1t600144F04A94DD370000144FEE09D000d0s2
  4. Finally you create a new ZFS pool:
    zpool create VDI-Extern c1t600144F04A94DD370000144FEE09D000d0
    Note: Take the bold part without the trailing s2! as your parameter to identify the disk
That's all. Now you can use the external LUN in the same way as an internal one. Performance characteristics will be different with this storage proxy. The more RAM and CPU you have, the better.