Wednesday, March 24, 2010

Configuring and troubleshooting basic software iSCSI setup

Configuring and troubleshooting basic software iSCSI setup (Extract from Vmware KB 1008083)

Symptoms


You are experiencing these issues with iSCSI targets:
  • Targets are numbered out of sequence.
  • Targets do not appear in VMware Infrastructure (VI) Client or VirtualCenter.
  • Targets do not appear in vSphere Client or vCenter Server.

Purpose


This article provides basic software iSCSI setup, configuration and troubleshooting.

Resolution


Configuration

From vSphere Client/VMware Infrastructure (VI) Client or vCenter Server:

  1. Ensure you have a separate physical vswitch for iSCSI.

  2. Add a VMKernel and Service Console portgroup and give them appropriate IPs.

    Note: A service console may not be needed if working in ESX / ESXi 4.0.

  3. Log into the ESX host and ensure you can ping the iSCSI array. Run the following command:

    # ping 10.1.10.100

    PING 10.1.10.100 (10.1.10.100) 56(84) bytes of data.
    64 bytes from 10.1.10.100: icmp_seq=0 ttl=64 time=0.766 ms


    Note: You do not need to use ping when working with ESX / ESXi 4.0 hosts.

  4. Log into the ESX host and ensure you can vmkping the iSCSI array. Run the following command:

    # vmkping 10.1.10.100

    PING 10.1.10.100 (10.1.10.100): 56 data bytes
    64 bytes from 10.1.10.100: icmp_seq=0 ttl=64 time=0.940 ms


    If you are unable to ping or vmkping the array, you need to correct your network connectivity issue before iSCSI works.


  5. Log in to vCenter Server, click on the ESX host, and click Configuration.

  6. Click Storage Adapters and click on the iSCSI Software Adapter.

  7. In the Details pane, click Properties.

  8. On the General tab, click Configure, select Enabled, then click OK. You notice that the Status is now enabled, and the iSCSI name has a valid IQN.

  9. Configure the iSCSI array to use the IQN you have just created. Generally, you also need to assign storage to the ESX host from the array.

  10. Click the Dynamic Discovery tab and click Add.

  11. In the Add Send Targets Server area, add the iSCSI array IP to the iSCSI Server field and click OK.

  12. After the iSCSI Server is added, click Close. This may take a significant amount of time.

  13. Rescan the ESX host storage in the Storage Adapters section, after the rescan, click on the iSCSI initiator and you see information about the SAN array as well as one or more targets.

Troubleshooting

To troubleshoot your setup or re-number your targets:

  1. Ensure that the array, and possibly each Service Processor, has an entry in each of the following files:


    • /etc/vmkiscsi.conf

      Syntax: DiscoveryAddress=:

      For example, DiscoveryAddress=10.200.107.10:3260


    • /var/lib/iscsi/vmkbindings

      Syntax: 0 0

      For example, 0 0 iqn.1992-08.com.company:sn.84259608

      Note: This file is rebuilt on rescan and should be recreated if iSCSI target numbers are out sequence.

    • /var/lib/iscsi/vmkdiscovery

      Syntax: 0 0

      For example, 0 0 iqn.1992-08.com.company:sn.84259608

      Note: This should be recreated if iSCSI target numbers are out sequence.



  2. Restart the Software iSCSI initiator:


    1. Disable the software iSCSI interface

      # esxcfg-swiscsi -d


    2. Kill the iSCSI stack

      # esxcfg-swiscsi -k


    3. Re-enable the iSCSI interface and open the firewall

      # esxcfg-swiscsi -e


    4. Rescan the Software Initiator, wait about 30 seconds after re-enabling

      # esxcfg-swiscsi -s


  3. Rescan a second time.

  4. Reboot the ESX host to have the changes take effect.
Note: If the vswitch is using NIC teaming, as a troubleshooting step, try disabling the second NIC and see if iSCSI functions.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.