vSphere Storage Appliance

 View Only
  • 1.  Log off iSCSI sessions?

    Posted May 17, 2010 08:54 PM

    Hi All,

    I currently have a virtual environment utilizing LEFTHAND (HP) iSCSI storage. I am migrating some of my vm's to different storage luns and would like to gracefully log off the existing iSCSI session from the LEFTHAND storage. Is there a way to do this from vSphere?



  • 2.  RE: Log off iSCSI sessions?

    Broadcom Employee
    Posted May 18, 2010 12:54 AM

    esxcli swiscsi session remove --adapter vmhba

    binoche, VMware VCP, Cisco CCNA



  • 3.  RE: Log off iSCSI sessions?

    Posted May 19, 2010 03:28 AM

    Hi,

    Not sure of what your trying to achieve. Are these VMFS LUNs your shutting down after the VMs are transitioned or just removing the LUN from an ESX host? Or is the host being retired.

    Could you expand what the end goal will be.

    Regards,

    Mike

    vExpert 2009



  • 4.  RE: Log off iSCSI sessions?

    Posted May 23, 2010 05:48 PM

    These VMFS LUNs I'm shutting down after the VMs are transitioned to new ones.



  • 5.  RE: Log off iSCSI sessions?

    Posted Jan 07, 2011 02:19 PM

    We use a HP Lefthand iSCSI SAN as well and ran into this exact issue.  Migrated a server to a larger LUN and wanted to be able to delete the old LUN to free up storage on the SAN

    I would like to preface this with the fact that only remove this connection after you are sure no more iSCSI traffic is going over that connection.  I had already ensured no data files were left on the LUN and had deleted it as a VMFS volume and refreshed storage on all connected hosts.  This resets it back to what it looks like when you first add a new iSCSI LUN.

    From within vCenter, look at the properties of the iSCSI initiator for the host in question. 

    Move over to the static discovery tab.  This should list all active iSCSI connections.  Even if you use dynamic discovery, as we do, to locate iSCSI send targets, LUNs already connected will be listed on the static targets tab. 

    expand out the target name field so you can easily recognize the LUN you need to "logoff" from.  These names will directly map to the IQN listed in the Lefthand CMC software.

    Highlight the one you need to logoff and click the remove button.  You should get a popup stating that you shouldn't do this if there is active I/O, but as long as everything has been removed as stated above, it'll be fine.

    After you click close on the bottom it will ask if you want to rescan, click no.  if you rescan it will log back on to the session you just ended.  The remove function will be reflected in the iSCSI sessions tab of the LUN in the Lefthand CMC immediately.

    Do this for each host connected and you can gracefully delete the LUN with the Lefthand CMC without forcibly ending iSCSI sessions.