ESXi: iSCSI LUNs disappear after rebooting storage device

Refer to: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038065

Most of these steps can’t be done on a production system.

  1. Ping test:
    1. From QNAP ssh, ping IP of iSCSI trunk group address (192.168.70.3).
    2. From QNAP ssh, ping IP of iSCSI port group on ESXi (192.168.70.1 and 192.168.70.2). This will most likely fail.
    3. From ESXi ssh, ping IP of iSCSI trunk group of QNAP (192.168.70.3). This will most likely fail.
    4. From ESXi SSH, ping IP of ESXi port gropu (192.168.70.1 & 192.168.70.2).
  2. Disable/ enable iSCSI LUN in QNAP storage manager and repeat ping tests.
  3. Reboot switch.
  4. Reboot ESXi host.
  5. From ESXi ssh, run:
    1. # esxcfg-swiscsi –d (disables iSCSI).
    2. # cd /etc/vmware/vmkiscsid.
    3. # mv initiatorname.iscsi initiatorname.iscsi.old.
    4. # mv iscsi.conf iscsi.conf.old.
    5. # mv vmkiscsid.db vmkiscsid.db.
  6. Reboot ESXi host.
  7. Once host is back, run:
    1. Enable iSCSI software initiator:

      # esxcfg-swiscsi –e.

      Note: a new ID is generated therefore, if using any form of access list, add it to the storage.

    2. Rescan:

      # esxcfg-swiscsi –s

    3. Add port group:

      # esxcli iscsi networkportal add -A vmhba38 -n vmk3.

      # esxcli iscsi networkportal add -A vmhba38 -n vmk2.

    4. Dynamically discover storage:

      # esxcli iscsi adapter discovery sendtarget add –address=192.168.70.3:3260 –adapter=vmhba38.

       

     

 

Please feel free to leave a comment...