Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
citrix:cmd:fc [2016/02/04 15:17] jscitrix:cmd:fc [2022/09/13 07:52] (current) – [show fc host adapter info] js
Line 1: Line 1:
 ===== fc cmds ===== ===== fc cmds =====
- +==== Probe the SR: ==== 
 +<code bash>xe sr-probe type=lvmohba device-config:device=/dev/disk/by-id/scsi-<your scsi id></code> 
 +\\   
 +==== Introduce the existing SR to XenServer: ==== 
 +<code bash>xe sr-introduce uuid=<device uuid> shared=true type=lvmohba name-label=<name></code> 
 +\\   
 +==== Create a PBD for each host in the pool: ==== 
 +<code bash>xe pbd-create sr-uuid=<device uuid> device-config:device=/dev/disk/by-id/scsi-<scsi id> host-uuid=<host uuid></code> 
 +\\   
 +==== Plug in the new PBD: ==== 
 +<code bash>xe pbd-plug uuid=<pbd uuid></code> 
 +\\   
 +==== Scan the SR: ==== 
 +<code bash>xe sr-scan uuid=<uuid></code> 
 +\\   
 ==== show fc host adapter info ==== ==== show fc host adapter info ====
- +<code bash>systool -c fc_host -v</code>  
-<code bash>systool -c fc_host v</code> oder <code bash>lspci |grep -i "fibre channel"</code> +or specified for only one host: 
 +<code bash>systool -c fc_host host0 -v</code>  
 +\\   
 +\\   
 +<code bash>lspci |grep -i "fibre channel"</code> 
 +\\   
 +\\   
 +<code bash>/opt/QLogic_Corporation/QConvergeConsoleCLI/scli -t</code> 
 +shows the target system node and port name / lun count of disks 
 +{{ :citrix:cmd:fc_scli-t.png?direct&800 |}} 
 +\\   
 +<code bash>/opt/QLogic_Corporation/QConvergeConsoleCLI/scli -i</code> 
 +shows local hba info 
 +{{ :citrix:cmd:fc_scli-i.png?direct&800 |}}  
 +\\   
 +<code bash>/opt/QLogic_Corporation/QConvergeConsoleCLI/scli -l</code> 
 +shows attached LUNs 
 +{{ :citrix:cmd:fc_scli-l.png?direct&800 |}} 
 +\\  
 ==== list wwpn for fc hba ==== ==== list wwpn for fc hba ====
 <code bash>systool -c fc_host -v |grep port_name</code> <code bash>systool -c fc_host -v |grep port_name</code>
 +or
 +<code bash>systool -A port_name -c fc_host host0</code>
 +<code bash>systool -A port_name -c fc_host </code>
 +\\  
 +
  
 ==== list wwn for fc hba ==== ==== list wwn for fc hba ====
 <code bash>systool -c fc_host -v |grep node_name</code> <code bash>systool -c fc_host -v |grep node_name</code>
 +\\  
 ==== list devices connected to hba ==== ==== list devices connected to hba ====
- +<code bash>systool -c fc_remote_ports -v -d</code> 
-<code bash>systool -c fc_remote_ports -v d</code> +\\  
 ==== list fc transport ==== ==== list fc transport ====
- +<code bash>systool -c fc_transport -v</code> 
-<code bash>systool -c fc_transport v</code> +\\  
 ==== show hba controller info ==== ==== show hba controller info ====
- 
 <code bash>systool -m <controller> -v</code> <code bash>systool -m <controller> -v</code>
  * controller   * controller 
    * qla2xxx = QLogic    * qla2xxx = QLogic
    * lpfc = Emulex    * lpfc = Emulex
 +\\  
 ==== list SCSI map ==== ==== list SCSI map ====
 +-x   also show bus, chan, id, lun and type
 <code bash>sg_map -n -x</code> <code bash>sg_map -n -x</code>
 +{{ :citrix:cmd:sg_map-x.png?direct |}} 
 +\\  
 ==== list disk connection info ==== ==== list disk connection info ====
-<code bash>systool -b scsi v</code> +<code bash>systool -b scsi -v</code> 
 +\\  
 ==== list SCSI disks connected to a system ==== ==== list SCSI disks connected to a system ====
-<code bash>systool -c scsi_disk v</code> +<code bash>systool -c scsi_disk -v</code> 
 +\\  
 ==== list SCSI host ==== ==== list SCSI host ====
 <code bash>cat /proc/scsi/scsi</code> <code bash>cat /proc/scsi/scsi</code>
 +\\  
 ==== Rescan hba devices ==== ==== Rescan hba devices ====
 <code bash>echo "- - -" > /sys/class/scsi_host/<host>/scan</code> <code bash>echo "- - -" > /sys/class/scsi_host/<host>/scan</code>
 +\\  
 +The three dash (" -  -") of the command act as wildcards meaning rescan everything. Remember that the three values usually stand for channel, SCSI target ID, and LUN.
 +==== show multipath ===
 +<code bash>multipathd -k"show paths"
 +multipathd -k"show multipaths topology"</code>
 +
 +Run the following command to show the current multipath topology:
 +<code bash>multipath -l
 +multipath -ll</code>
 +
 +Run the following command to show the verbosity and print all paths and multipaths:
 +<code bash>multipath -v 2</code>
 +
 +Run the following command to refresh information what is supplied by previous commands:
 +<code bash>multipath -v 3</code>
 +\\  
 +
 +Script to scan all the LUNs and update the SCSI layer to reflect new devices:
 +<code bash>/usr/bin/rescan-scsi-bus.sh</code>
 +\\  
  
-==== show multipath === 
-<code bash>multipathd -k"show paths"</code> 
-<code bash>multipathd -k"show multipaths topology"</code> 
-<code bash>multipath -ll</code> 
  
 +==== refresh xencenter display ====
 +If you notice that “multipath –ll” shows you all the paths correctly and XenCenter shows you that some paths are not connected, you can refresh the information by:<code bash>/opt/xensource/sm/mpathcount.py</code>
 +\\  
  
 +==== rescan scsi bus ====
 +<code bash>/usr/bin/rescan-scsi-bus.sh</code>
  
 +===== Links =====
 +  * [[https://linoxide.com/storage/scandetect-luns-redhat-linux-outputs-remember/]] How to identify the HBA cards/ports and WWN in Linux
 +  * [[http://fibrevillage.com/storage/61-systool-a-useful-tool-for-san-as-well-for-sysfs-devices]]
 +  * [[https://blog.osnexus.com/2012/03/20/understanding-fc-fabric-configuration-5-paragraphs/]]