How to find ISCSI target LUN - by cmd or powershell or...by ...whatever?

InfoTechdude 156 Reputation points
2020-08-27T15:43:06.643+00:00

Hi,

I wonder what is the way to find out Iscsi Target's LUN? In a command like Iscsicli there are options to include this parameter, but... how to get it? GUI or cmd/powershell?

Anyone?

Reference:
https://video2.skills-academy.com/en-us/archive/blogs/san/iscsi-initiator-command-line-reference-and-server-core-configuration

Example: Iscsicli AddTarget <Target Lun> .

Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
650 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Alex Bykovskyi 2,011 Reputation points
    2020-08-29T22:55:00.72+00:00

    Hey,

    In addition to mentioned above, you can use powershell to work with the iSCSI targets. The following guide should help: https://www.starwindsoftware.com/blog/dont-break-your-fingers-with-hundreds-of-clicks-automate-windows-iscsi-connections

    Cheers,

    Alex Bykovskyi

    StarWind Software

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    1 person found this answer helpful.
    0 comments No comments

  2. Xiaowei He 9,891 Reputation points
    2020-08-28T06:20:29.233+00:00

    Hi,

    Please check if the method in the following link could help find the LUN ID:

    https://support.purestorage.com/Solutions/Microsoft_Platform_Guide/Multipath-IO_and_Storage_Settings/View_Disk_Properties_and_LUN_Information_in_Windows

    (Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

    )

    If the reply could be of help, please help to accept it as an answer, thanks for your cooperation!
    Thanks for your time!
    Best Regards,
    Anne

    0 comments No comments

  3. InfoTechdude 156 Reputation points
    2020-09-01T16:42:17.903+00:00

    @Xiaowei He @Alex Aguilar Bykovskyi Thanks. What i mean is what do I use as "lun" in the following command? Is this name of the disk/virtual disk/ c: maybe something else?

    Add-IscsiVirtualDiskTargetMapping
    [-TargetName] <String>
    [-Path] <String>
    [-Lun <Int32>]

    or Iscsicli AddTarget <Target Lun>

    This is not clear to me.

    0 comments No comments

  4. InfoTechdude 156 Reputation points
    2020-09-01T16:47:11.503+00:00

    @Xiaowei He @Alex Aguilar Bykovskyi or for the sake of simplicity can you do it from server manager/iscsi target/iscsi initator? How to find it? What exactly is "LUN" ? Am I seeking the disk nr/ mount point/virtual disk name/iqn - any other?

    21935-iscsi2.jpg

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.