Tuesday, July 21, 2009

XenServer iSCSI SAN Setup/Config

There are 2 ways to setup iSCSI SAN connections in XenServer. Via cli or gui.

Create Bonded connection
  1. Click your Pool
  2. Click a Host
  3. Click NICs tab
  4. Click Create Bond
  5. Add NICs
  6. Create
  7. I then recommend going to Network and naming the bond that shows something understandable
GUI Method
  1. Click Server drop down then Management Interfaces
  2. Click New Interface at the bottom
  3. Name the MI and select the Network NIC
  4. Enter IP information

CLI Method

  1. Open the cli for the server needing connection to the iSCSI SAN
  2. Type "xe pif-list" to get the uuid of the pif you want to alter (note that eth0 is listed at the bottom)
  3. xe pif-reconfigure-ip mode=Static uuid=(enter uuid) ip=IPaddresshere setmask=255.255.255.0
  4. xe pif-param-set disallow-unplug=true uuid=(enter uuid)
  5. xe pif-param-set other-config:management_purpose="Storage" uuid=(enter uuid)
  6. At this point you should be able to ping an iSCSI storage node from the server console
  7. Don't make the same mistake I did... remember to give the server node access permissions within your SAN management interface so that it can discover the Target IQN. To find the IQN of the node type simply open the server node properties. On the General tab it is listed at the bottom. Change it to a desired IQN.
  8. Click Storage and select iSCSI
  9. Type in the IP of the Storage server target host
  10. Click discover IQNs then discover LUNs. Click Finish. Note that you will want to ensure that you have exported your VI server prior to connecting to any existing VI LUNs as it will format the disk for XenServer use.

At this point I went on to import the converted VI server onto the disk. Note that initial attempts to import a 19.99GB export onto a 20GB disk failed saying that their wasn't enough space. To get around this I edited the volume to have an additional .5GB. Less than this would have likely been sufficient. I then followed the import steps from Virtual Iron > Citrix XenServer Conversion to successfully import the VM.

9 comments:

  1. Hi, how to give the server node access permissions ? I always failed on create iSCSI storage...

    Thanks

    ReplyDelete
  2. Depends on the SAN you have. This is configured from the SAN side using the information given by the XS Node. What type of SAN do you have?

    For LeftHand you would go into the LH management console and create a new "server" and add the correct Initiator Node Name that XenServer assigned to the XS node. IE iqn.2009-07.example:644ba730

    Hope that helps.

    ReplyDelete
  3. Hi, I am using SUN storage. but I wonder why I unable to discover the IQNs.

    Now I have 3 hosts (192.168.20.a, 192.168.20.b and 192.168.20.c) connect together to SAN 192.168.20.d

    1. Is it need to add the permissions for all those a-c?
    2. Before I click on "Discover IQNs",which IP should I use for?

    Thanks for your help.

    ReplyDelete
  4. Hi Mathew,

    I would assume that yes you will need to setup the permissions for a-c in the SUN storage management and then run the discovery from XS on the d address if I'm understanding the setup correctly.

    ReplyDelete
  5. Hi Aaron,
    If I already got the storage IQN, how I determine the IQNs for each hosts?
    Thanks.

    ReplyDelete
  6. You can self define to some extent each hosts IQN. You can find this setting in the GUI under properties for each node. It's under the general tab at the bottom. Each node of course has to be a unique IQN.

    ReplyDelete
  7. If I defined a wrong IQNs for each hosts, will that effect I can't add the iSCSI storage?

    Thanks

    ReplyDelete
  8. Yes, IQN's setup for each XS node in the SAN have to match what is shown in XenCenter, otherwise they will be unable to authenticate with the SAN.

    ReplyDelete
  9. Thanks!
    It's a nice manual how to configure XS+SAN. It really helped us to set up the SAN in our network. We used Starwind 5.0 HA ( http://www.starwindsoftware.com/starwind ).

    ReplyDelete