XenServer and Synology iSCSI


This is a short post that shows how to make iSCSI from a Synology DS412+ with DSM version 4.3 work with XenServer 6.2. They are compatible so this does work. Connecting them requires you to follow the standard iSCSI setup in the Synology NAS and the standard XenServer iSCSI new SR process (as documented in their manuals). I recommend one additional step on the Synology side.

I will walk you through a basic configuration. This configuration uses a single network interface, no VLANs, no CHAP authentication, and no multipathing on the XenServer side. The general steps are:

  1. Create an iSCSI target and LUN on the Synology NAS .
  2. Add the this target as a storage SR to XenServer.

The detailed steps are below:

A. Create an iSCSI target and LUN on the Synology NAS.

  1. Ensure that the Synology NAS is functioning correctly.
    1. You can access the web DSM interface
    2. The Synology box has the latest version of DSM.
  2. Determine which Synology Volume you will put the iSCSI LUN on.
    1. The Volume must have been previously created.
    2. The Volume must have enough space to hold the LUN.
  3. In the DSM web interface, enable iSCSI access:
    1. Click on the “Start Bar” icon in the upper left corner.
    2. Click Storage Manager
    3. Click on the iSCSI Target tab
    4. Click create. This starts a wizard but you an cancel this at any point before the end and it will not save the changes.
      1. For Name give it any label you want.
      2. For IQN enter text in this format: iqn.[year-month, e.g. 2013-11].[your domain name in reverse, e.g. com.google]:[a unique label distinguishing this iSCSI target from your others, e.g. virtualization.storage]
      3. Skip CHAP and click next.
      4. Select Create New LUN. Click next.
      5. Select iSCSI LUN (Regular Files). Click next.
      6. Name the LUN. No need to get fancy. LUN-1,2,3,etc. is fine.
      7. Choose the volume you identified in step 2.
      8. Set Thin: yes, Advanced: yes
      9. Enter the size. The Volume you choose must have this amount of space on it.
      10. Click Next and then Apply.
  4. Enable multiple sessions on the Synology NAS
    1. Go back to Storage Manager.
    2. Select the iSCSI tab
    3. Select your newly created target.
    4. Click the Edit button
    5. Select the Advanced tab.
    6. Click the “Allow multiple sessions…” check-box.
    7. Click OK
    8. The reason for doing this is to allow multipathing from XenServer. This setup does not use it but if you have 2 NICs on your Synology NAS like the DS412+ does, you will eventually want to use this feature. If this is not set, you will get hard to debug errors on the Xen side when you try multipathing.

That completes setup on the Synology side. Next you must add the iSCSI connection to Xen.

B. Add the this target as a storage SR to XenServer.

  1. Open XenCenter.
  2. Right click on a host (one that is not in a pool), and select New SR.
  3. Select software iSCSI, then click Next. Click on the button below which says
  4. Give the SR a name. Any value that makes sense to you is fine. Click Next.
  5. This next pane requires multiple steps done in order:
    1. In Target Host enter the IP address or full hostname of the Synology NAS.
    2. Click on the button which says Discover IQNs
    3. The IQN you just created should appear. If it does not or you get an error the most likely problem is the network. Check that you can ping the Synology from the Xen host console. Ensure that you can. If you still get an error then I recommend you try use the Xen CLI to do this instead. The instruction are in the Xen documentation.
    4. After selecting you IQN in the Target IQN field, click the Discover LUNs button.
    5. You should see the LUN that you created. Make sure it is selected.
    6. Click Finish
  6. You are done. Now you can create VMs that use iSCSI storage instead of local drive space. In my setup (gigabit LAN) the performance is very good.

Good luck with your installation. Experiment with pools and multipathing. If you have 2 NICs in your Synology NAS and your Xen host, and you have multipathing enabled on your Xen host, then when you follow the steps above Xen will automatically use both network interfaces when you add the iSCSI target.



Categories: Hardware

Tags: , , ,

Share Your Ideas

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: