xe sr-probe type=lvmoiscsi device-config:target=<device ip> device-config:targetIQN=<iqn>
xe sr-introduce uuid=<device uuid> shared=true type=lvmoiscsi name-label=<name>
xe pbd-create sr-uuid=<device uuid> host-uuid=<host uuid> device-config:target=<device ip> device-config:targetIQN=<iqn> device-config:SCSIid=<scsi id>
xe pbd-plug uuid=<pbd uuid>
xe sr-scan uuid=<uuid>
iscsiadm -m discovery -t sendtargets -p ipaddress
iscsiadm -m node -l
iscsiadm -m node -T targetname -p ipaddress –l
iscsiadm -m node -u
iscsiadm -m node -T targetname -p ipaddress -u
iscsiadm -m node -T targetname -p ipaddress
iscsiadm -m node -s -T targetname -p ipaddress
iscsiadm -m session
iscsiadm -m discovery -o show
iscsiadm -m node -o show
iscsiadm -m session -o show
Find the newly created device name, using the iscsiadm command. In this test configuration, the new volume is /dev/sdb. At the end of the output you could see attached scsi disk name.
iscsiadm -m session -P3
When you expand the volume or disk, you might need to rescan. So the below command will help:
iscsiadm -m node -p 192.168.40.10 --rescan
# xe sr-probe type=lvmoiscsi device-config:target=<Target IP> device-config:targetIQN=<Target IQN>
Example:
# xe sr-probe type=lvmoiscsi device-config:target=10.12.45.10 device-config:targetIQN=iqn.1992-08.com.netapp:sn.135027806
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>
Identify UUID of the SR that is unplugged:
# xe sr-list type=lvmoiscsi
Identify expected SCSI ID of the LUN containing SR that is unplugged:
# xe pbd-list sr-uuid=<SR UUID>
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 [10.12.45.10 (iqn.1992-08.com.netapp:sn.135027806)] host ( RO): xenserver-dellAMDR131 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: 10.12.45.10; SCSIid:\ 360a9800050334c66435a49636f545143; targetIQN: iqn.1992-08.com.netapp:sn.135027806 currently-attached ( RO): false
Note: This SCSI ID should match the entry under the XenCenter iSCSI SR General Tab. SCSI ID collected from steps 3 and 4 must match. If they do not your LUN SCSI ID has been changed.