This article will help in identifying if the iSCSI/HBA Storage Repository (SR) has changed SCSI IDs and provide steps to repair it.
The following procedures describe how to identify and correct the problem with SCSI ID mappings in XenServer.
Identify the SCSI ID mapping which has issue
# xe sr-probe type=lvmoiscsi device-config:target=<Target IP> device-config:targetIQN=<Target IQN>
# xe sr-probe type=lvmohba host-uuid=<UUID of the XenServer host>
Example:
# xe sr-probe type=lvmoiscsi device-config:target=xx.xx.xx.xx device-config:targetIQN=iqn.1992-08.com.xxxx:sn.xxxxxxx Error code: SR_BACKEND_FAILURE_107 Error parameters: , The SCSIid parameter is missing or incorrect, <?xml \version="1.0" ?> <iscsi-target> <LUN> <vendor> NETAPP </vendor> <serial> P3LfCZIcoVML </serial> <LUNid> 150 </LUNid> <size> 23622320128 </size> <SCSIid> 360a9800050334c66435a49636f564d4c </SCSIid> </LUN> </iscsi-target>
# xe sr-list type=lvmoiscsi - Identify UUID of the SR that is unplugged.
# xe pbd-list sr-uuid=<SR UUID> - Identify expected SCSI ID of the LUN containing SR that is unplugged.
Example:
# xe sr-list type=lvmoiscsi uuid ( RO) : f6a7d8be-cd21-d9b2-1864-9c67d7ed1724 name-label ( RW): iSCSI virtual disk storage name-description ( RW): iSCSI SR xx.xx.xx.xx (iqn.1992-08.com.xxxx:sn.xxxxxxx)] host ( RO): xenserver type ( RO): lvmoiscsi content-type ( RO):
# xe pbd-list sr-uuid=f6a7d8be-cd21-d9b2-1864-9c67d7ed1724 uuid ( RO) : 9cd47f3e-944d-0ea2-522c-5c7e399543ab host-uuid ( RO): ac3e1d25-c12e-4588-bc35-857ad1fa7e43 sr-uuid ( RO): f6a7d8be-cd21-d9b2-1864-9c67d7ed1724 device-config (MRO): port: 3260; target: xx.xx.xx.xx; SCSIid:\ 360a9800050334c66435a49636f545143; targetIQN:iqn.1992-08.com.xxxx:sn.xxxxxxx currently-attached ( RO): false
Note: This SCSI ID should match the entry under the XenCenter iSCSI/HBA SR General Tab.
SCSI ID collected from steps 3 and 4 must match. If they do not your LUN SCSI ID has been changed.
To correct the issue you must recreate a PBD with the entry to reflect the right SCSI ID.
1. Destroy the existing PBD by running the following commands:# xe pbd-unplug uuid=<PBD UUID> - PBD of the iSCSI Storage Repository with mismatched SCSI ID collected from the output of the pbd-list command during investigation.
# xe pbd-destroy uuid=<PBD UUID> - PBD of the iSCSI SR with mismatched SCSI ID collected from the output of the pbd-list command during your investigation.
# xe pbd-unplug uuid=9cd47f3e-944d-0ea2-522c-5c7e399543ab # xe pbd-destroy uuid=9cd47f3e-944d-0ea2-522c-5c7e399543ab.
# xe pbd-create sr-uuid=<SR UUID> host-uuid=<Host UUID> device-config:target=<Target IP> device-config:targetIQN=<Target IQN> device-config:SCSIid=<SCSI ID> - SCSI ID collected from the output of the pbd-list command during investigation.
# xe pbd-plug uuid=<PBD UUID> > - Activate SR by plugging in newly created PBD.
Example:
# xe pbd-create sr-uuid=f6a7d8be-cd21-d9b2-1864-9c67d7ed1724 host-uuid=ac3e1d25-c12e-4588-bc35-857ad1fa7e43 device-config:target=xx.xx.xx.xx device-config:targetIQN=iqn.1992-08.com.xxxx:sn.xxxxxxx device-config:SCSIid=360a9800050334c66435a49636f564d4c 2cb5ead5-0184-e5ec-e25d-2897ce402a81 <- Will return UUID of the created PBD. # xe pbd-plug uuid=2cb5ead5-0184-e5ec-e25d-2897ce402a81
3. Confirm that the Storage Repository is active in XenCenter iSCSI SR General Tab.
Additional background and/or reference information can be obtained from the XenServer Administrators guide.