How To Identify If SCSI Storage Repository Has Changed SCSI IDs

How To Identify If SCSI Storage Repository Has Changed SCSI IDs

book

Article ID: CTX118641

calendar_today

Updated On:

Description

This article will help in identifying if the iSCSI/HBA Storage Repository (SR) has changed SCSI IDs and provide steps to repair it.


Instructions

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

Correct SCSI ID mappings


 

Identify the SCSI ID mapping which has issue:

  • In XenCenter, iSCSI/HBA SR General Tab indicates that the Storage Repository is unplugged
  • Repair fails with “No such device” error
 
  1. Identify what is the current SCSI ID on the LUN containing your Storage Repository:
For iSCSI SR :
# xe sr-probe type=lvmoiscsi device-config:target=<Target IP> device-config:targetIQN=<Target IQN>

For HBA SR :
# xe sr-probe type=lvmohba host-uuid=<UUID of the XenServer host>
 
In this article, we will take an example of an iSCSI SR.

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>

 

 
  1. Identify what SCSI ID the XenServer expects to be on the LUN containing your Storage Repository by running the following commands:
# 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.




 

Correct SCSI ID mappings

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.

 

Example:
# xe pbd-unplug uuid=9cd47f3e-944d-0ea2-522c-5c7e399543ab
# xe pbd-destroy uuid=9cd47f3e-944d-0ea2-522c-5c7e399543ab
.  
2. Create new PBD and activate Storage Repository by running the following commands:
# 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.

Issue/Introduction

This article describes how to Identify the iSCSI Storage Repository has Changed SCSI IDs

Additional Information

Additional background and/or reference information can be obtained from the XenServer Administrators guide.