Test bed details
Qnap firmware version: 3.3.1 Build 0720T
vSphere: 4.1.0 build 260247
I recently purchased a Qnap TS-210 as I wanted to use the iSCSI feature with my home VMware setup. Installation of the device was straight forward. As soon as a hard disk is installed and the unit is powered on, you can use the bundled software to search for the NAS. You’re then taken through a wizard to set such things as IP, time zone, set admin credentials and update the firmware.
Setting up iSCSI on the Qnap
This was a pretty simple process and involved following the steps as below:
1) If running virtual machines on the device (as we intend to do) you’re advised to disable the write cache – This is done by deselecting the write cache check box under the System Administration > Hardware menu.
2) Select Disk Management > iSCSI and select the check box ‘Enable iSCSI Target Service’.
3) Again, under the Disk Management > iSCSI menu select the Target Management tab. A wizard will then begin asking which of the following you wish to setup:
- iSCSI Target with a mapped LUN
- iSCSI Target only
- iSCSI LUN only
As this is a new install you’ll need to create both an iSCSI Target and LUN so the 1st option should be selected.
4) You’ll be asked to provide a Target name and Target Alias. The name provided will form part of the iSCSI Target IQN i.e. iqn.2004-04.com.qnap:ts-210:iscsi.NAMEGIVEN.f02n6h
5) Now you can choose whether you wish to use CHAP authentication, and if so enter the credentials to use.
6) The final selection window will ask for the following details:
- LUN Allocation – Thin provisioning (i.e. not all space is provided at this moment in time) or Instant Allocation
- LUN Name
- LUN Location (i.e. choose the appropriate disk/RAID)
7) Finally you’ll be prompted to confirm the previous selections before clicking finish. If you have opted for the Instant Allocation LUN there will be a figure in % displaying the amount of processing that has completed.
NB. If a large LUN is being created this processing time can take quite a while.
Allocating the LUN to VMware ESX
1) Use the VMware vSphere/Infrastructure client to connect to the VC or an individual ESX box.
2) A VMkernel port will need to be setup before configuring the software iSCSI initiator. This will obviously have to be on the same segment as the Qnap.
3) The next step is to configure the software iSCSI initiator (configuration > storage adaptors > iSCSI software adaptor) then select properties > configure > click the enable check box and you’ll notice the iSCSI name automatically populates.
4) If you previously setup CHAP authentication on the Qnap you can enter those credentials under the general window.
5) To add the Qnap iSCSI target you’ll need to add (copy/paste) the Qnap iqn and Qnap server IP address under the ‘Add static target server’ tab. Click OK and then you’ll be prompted to rescan the HBA.
6) Finally select Storage > Add Storage > Disk/LUN and you’ll then see the LUN as created on the Qnap. Continue with the adding storage process as you would normally, i.e. give the LUN a name, select the block size and that’s it.
There you have it; VMware ESX using a LUN hosted on a sub £200 NAS. Very very neat!