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
Iscsiadm discovery
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
cd /sys/class/scsi_host/ [root@scsi_host]# lshost0 host1 host2[root@scsi_host]#
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.
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.
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.
- how to check iscsi target in linux
- how to discover iscsi lun in linux