fc cmds

Probe the SR:

xe sr-probe type=lvmohba device-config:device=/dev/disk/by-id/scsi-<your scsi id>


Introduce the existing SR to XenServer:

xe sr-introduce uuid=<device uuid> shared=true type=lvmohba name-label=<name>


Create a PBD for each host in the pool:

xe pbd-create sr-uuid=<device uuid> device-config:device=/dev/disk/by-id/scsi-<scsi id> host-uuid=<host uuid>


Plug in the new PBD:

xe pbd-plug uuid=<pbd uuid>


Scan the SR:

xe sr-scan uuid=<uuid>


show fc host adapter info

systool -c fc_host -v

or specified for only one host:

systool -c fc_host host0 -v



lspci |grep -i "fibre channel"



/opt/QLogic_Corporation/QConvergeConsoleCLI/scli -t

shows the target system node and port name / lun count of disks

/opt/QLogic_Corporation/QConvergeConsoleCLI/scli -i

shows local hba info

/opt/QLogic_Corporation/QConvergeConsoleCLI/scli -l

shows attached LUNs

list wwpn for fc hba

systool -c fc_host -v |grep port_name

or

systool -A port_name -c fc_host host0
systool -A port_name -c fc_host 


list wwn for fc hba

systool -c fc_host -v |grep node_name


list devices connected to hba

systool -c fc_remote_ports -v -d


list fc transport

systool -c fc_transport -v


show hba controller info

systool -m <controller> -v

* controller

  • qla2xxx = QLogic
  • lpfc = Emulex


list SCSI map

-x also show bus, chan, id, lun and type

sg_map -n -x


list disk connection info

systool -b scsi -v


list SCSI disks connected to a system

systool -c scsi_disk -v


list SCSI host

cat /proc/scsi/scsi


Rescan hba devices

echo "- - -" > /sys/class/scsi_host/<host>/scan


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

multipathd -k"show paths"
multipathd -k"show multipaths topology"

Run the following command to show the current multipath topology:

multipath -l
multipath -ll

Run the following command to show the verbosity and print all paths and multipaths:

multipath -v 2

Run the following command to refresh information what is supplied by previous commands:

multipath -v 3


Script to scan all the LUNs and update the SCSI layer to reflect new devices:

/usr/bin/rescan-scsi-bus.sh


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:

/opt/xensource/sm/mpathcount.py


rescan scsi bus

/usr/bin/rescan-scsi-bus.sh