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:
- Create an iSCSI target and LUN on the Synology NAS .
- 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.
- Ensure that the Synology NAS is functioning correctly.
- You can access the web DSM interface
- The Synology box has the latest version of DSM.
- Determine which Synology Volume you will put the iSCSI LUN on.
- The Volume must have been previously created.
- The Volume must have enough space to hold the LUN.
- In the DSM web interface, enable iSCSI access:
- Click on the “Start Bar” icon in the upper left corner.
- Click Storage Manager
- Click on the iSCSI Target tab
- Click create. This starts a wizard but you an cancel this at any point before the end and it will not save the changes.
- For Name give it any label you want.
- 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]
- Skip CHAP and click next.
- Select Create New LUN. Click next.
- Select iSCSI LUN (Regular Files). Click next.
- Name the LUN. No need to get fancy. LUN-1,2,3,etc. is fine.
- Choose the volume you identified in step 2.
- Set Thin: yes, Advanced: yes
- Enter the size. The Volume you choose must have this amount of space on it.
- Click Next and then Apply.
- Enable multiple sessions on the Synology NAS
- Go back to Storage Manager.
- Select the iSCSI tab
- Select your newly created target.
- Click the Edit button
- Select the Advanced tab.
- Click the “Allow multiple sessions…” check-box.
- Click OK
- 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.
- Open XenCenter.
- Right click on a host (one that is not in a pool), and select New SR.
- Select software iSCSI, then click Next. Click on the button below which says
- Give the SR a name. Any value that makes sense to you is fine. Click Next.
- This next pane requires multiple steps done in order:
- In Target Host enter the IP address or full hostname of the Synology NAS.
- Click on the button which says Discover IQNs
- 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.
- After selecting you IQN in the Target IQN field, click the Discover LUNs button.
- You should see the LUN that you created. Make sure it is selected.
- Click Finish
- 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.