I need to do some storage server upgrades. That means removing all the mapped iSCSI datastores being shared from a particular storage server. Normally I would do it manually from inside of the vSphere client, just to make sure that the datastores are empty. So after I'm confident a datastore is empty I would unmount the datastore then delete it from inside of vSphere Client. My problem is, when I go back to the storage server it says that all my hosts are still connected to iSCSI Target. So the question is: Can I/How do I get my VMHosts to disconnect/logout of my storage server. I understand I don't have to, but I would still like to know if there is a way to do it. I guess my biggest problem is, that once I manually delete a datastore from my cluster I can't find a way to reference it or its LUNs to even attempt to clean up any lingering associations between my hosts and my decommissioned storage server.
How would I get a list of LUNs that are not actively being used in datastores? I can't think of a reason why I would have a LUN and not have it being associated to an active datastore.
In the end, I think, I would use something like:
to have a host disconnect/logout from an iSCSI session?
Second question. Along the same line as the first. When I bring online the replacement storage server I'll be adding new iSCSI datastores to my cluster. With my recent upgrade to vCenter 6.5 and being forced to use that god awful web interface to manage my VMware infrastructure, I can't find a way to see the iSCSI IQN on the page where I add a new datastore, so if I have multiple iSCSI targets ready to add to my cluster I can't tell which datastore is which to assign it the proper name. At present I can manually get a list of the available device UUIDs then go back to the storage adapters configuration page, list all the LUNs there, then one by one cross-reference the UUID and get the IQN.
Anyway, how can get a list of all the LUNs no being used in datastores and get the IQN of that LUN?
I hope these questions make sense, and thanks.