HP BL680c XenServer Administrator's Guide 4.1.0 - Page 25

Probing an SR

Page 25 highlights

Storage There are two basic steps involved in creating a new storage repository for use on a XenServer Host via the CLI: 1. Probe the SR type to determine values for any required parameters. 2. Create the SR to create the SR object and associated PBD objects, plug the PBDs, and activate the SR. These steps differ in detail depending on type of SR being created. In all examples the sr-create command will return the UUID of the SR if successful. SRs can also be destroyed when no longer in use to free up the physical device, or forgotten to detach the SR from one XenServer Host and attach it to another. See Section 3.4.1, "Destroying or forgetting a SR " for details. 3.3.2. Probing an SR The sr-probe CLI command can be used in two ways: 1. To identify unknown parameters for use in creating a SR 2. To return a list of existing SRs In both cases sr-probe works by specifying an SR type and one or more device-config parameters for that SR type. When an incomplete set of parameters is supplied sr-probe returns an error message indicating parameters are missing and the possible options for the missing parameters. When a complete set of parameters is supplied a list of existing SRs is returned. All sr-probe output is returned as an XML list. For example, a known iSCSI target can be probed by specifying its name or IP address, and the set of IQNs available on the server will be returned: # xe sr-probe type=lvmoiscsi device-config:target=192.168.1.10 Error code: SR_BACKEND_FAILURE_96 Error parameters: , The request is missing or has an incorrect target IQN parameter, \ 0 192.168.1.10 iqn.192.168.1.10:filer1 Probing the same target again and specifying both the name/IP address and desired IQN will return the set of SCSIids (LUNs) available on the target/IQN. 19

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108

Storage
19
There are two basic steps involved in creating a new storage repository for use on a XenServer Host via
the CLI:
1.
Probe the SR type to determine values for any required parameters.
2.
Create the SR to create the SR object and associated PBD objects, plug the PBDs, and activate the SR.
These steps differ in detail depending on type of SR being created. In all examples the sr-create command
will return the UUID of the SR if successful.
SRs can also be destroyed when no longer in use to free up the physical device, or forgotten to detach
the SR from one XenServer Host and attach it to another. See Section 3.4.1, “Destroying or forgetting a
SR ” for details.
3.3.2. Probing an SR
The sr-probe CLI command can be used in two ways:
1.
To identify unknown parameters for use in creating a SR
2.
To return a list of existing SRs
In both cases
sr-probe
works by specifying an SR type and one or more device-config parameters for
that SR type. When an incomplete set of parameters is supplied
sr-probe
returns an error message
indicating parameters are missing and the possible options for the missing parameters. When a complete set
of parameters is supplied a list of existing SRs is returned. All
sr-probe
output is returned as an XML list.
For example, a known iSCSI target can be probed by specifying its name or IP address, and the set of IQNs
available on the server will be returned:
# xe sr-probe type=lvmoiscsi device-config:target=192.168.1.10
Error code: SR_BACKEND_FAILURE_96
Error parameters: , The request is missing or has an incorrect target IQN parameter, \
<?xml version="1.0" ?>
<iscsi-target-iqns>
<TGT>
<Index>
0
</Index>
<IPAddress>
192.168.1.10
</IPAddress>
<TargetIQN>
iqn.192.168.1.10:filer1
</TargetIQN>
</TGT>
</iscsi-target-iqns>
Probing the same target again and specifying both the name/IP address and desired IQN will return the set
of SCSIids (LUNs) available on the target/IQN.