How to scan iscsi lun in linux

    how to scan iscsi lun in linux
    how to check iscsi lun in linux
    how to rescan iscsi lun in linux
    how to scan new iscsi lun in linux
  • How to scan iscsi lun in linux
  • Iscsiadm discovery

  • Iscsiadm rescan luns
  • Echo - - -'' > /sys/class/scsi_host/host0/scan
  • Iscsiadm list luns
  • First, run the following ISCSI rescan on one HV: iscsiadm -m node -R Find the name of your SAN device and compare its size with the size of your LUN.
  • Echo - - -'' > /sys/class/scsi_host/host0/scan...

    In this post  we will discuss how to scan new LUNs allocated by storage team to a Redhat Linux system.
    There are two ways of scanning the LUNs
    Method 1:-
    Find how many SCSI bus controllers you have

    • Go to directory /sys/class/scsi_host/  and list it’s contents.

    cd /sys/class/scsi_host/ [root@scsi_host]# lshost0 host1 host2[root@scsi_host]#
    • Here we can see we have three SCSI bus controllers.

      So in below command replace hostX with these directory names.

    Run the Command ,
    echo "- - -" > /sys/class/scsi_host/hostX/scan [root@cloudvedas]# echo "- - -" > /sys/class/scsi_host/host0/scan[root@cloudvedas]# echo "- - -" > /sys/class/scsi_host/host1/scan[root@cloudvedas]# echo "- - -" > /sys/class/scsi_host/host2/scan[root@cloudvedas]# echo "- - -" > /sys/class/scsi_host/host3/scanTIP:- Here the “- – -” denotes CxTxDx i.e.

    Channel(controller) , Target ID and Disk or LUN number. This is asked in Linux Admin Interviews also.

    • Repeat the above step for all three directories.
    If you have FC HBA in the system you can follow

      how to check iscsi target in linux
      how to discover iscsi lun in linux