How do I find the FC ID (WWN) of a scsi device/LUN on Linux

 

How do I find the FC ID (WWN)

Identify the number of FC HBA Adapters
root@rhel:~#yum install sysfsutils.x86_64

root@rhel:~#
systool -c fc_host
Class = "fc_host"

  Class Device = "host1"
    Device = "host1"

  Class Device = "host2"
    Device = "host2"
Print Wold  Wide Node name wwnn
root@rhel:~#cat /sys/class/scsi_host/host*/device/fc_host/host*/node_name
0x20000090fa9e9738
0x20000090fa9e9739
Print Wold  Wide Port name wwpn
root@rhel:~#cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name
0x10000090fa9e9738
0x10000090fa9e9739

 

مطالب و دوره های آموزشی مرتبط
مطالب و دوره های آموزشی مرتبط
مطالب و دوره های آموزشی مرتبط

 

How to Scan new scsi device/LUN or Resized LUN on Linux

 

Scan the newly added or rescan the existing LUNs in Linux

Scan by echo for new LUN or Resized LUN
root@rhel:~#echo "1" > /sys/class/fc_host/host1/issue_lip
root@rhel:~#echo "- - -" > /sys/class/scsi_host/host1/scan
Scan by rescan-scsi-bus.sh for new LUN or Resized LUN
root@rhel:~#yum install sg3_utils
root@rhel:~#rescan-scsi-bus.sh -a
Scanning SCSI subsystem for new devices
Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs
 Scanning for device 0 0 0 4194240...
OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 4194240
      Vendor: HP       Model: P830i            Rev: 4.54
      Type:   RAID                             ANSI SCSI revision: 05
 Scanning for device 0 0 0 0...
OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
      Vendor: HP       Model: P830i            Rev: 4.54
      Type:   RAID                             ANSI SCSI revision: 05
 Scanning for device 0 1 0 0... 0...     
OLD: Host: scsi0 Channel: 01 Id: 00 Lun: 00
      Vendor: HP       Model: LOGICAL VOLUME   Rev: 4.54
      Type:   Direct-Access                    ANSI SCSI revision: 05
Scanning host 1 for  all SCSI target IDs, all LUNs
Scanning host 2 for  all SCSI target IDs, all LUNs
0 new or changed device(s) found.          
0 remapped or resized device(s) found.        
0 device(s) removed.  
root@rhel:~#rescan-scsi-bus.sh -a -s
Scanning SCSI subsystem for new devices
Searching for resized LUNs
0 new or changed device(s) found.          
0 remapped or resized device(s) found.        
0 device(s) removed.

 

مطالب و دوره های آموزشی مرتبط
مطالب و دوره های آموزشی مرتبط
مطالب و دوره های آموزشی مرتبط