Citrix Systems 5.6 Benutzerhandbuch

Seite von 235
59
Destroying or forgetting a SR
You can destroy an SR, which actually deletes the contents of the SR from the physical media. Alternatively
you can forget an SR, which allows you to re-attach the SR, for example, to another XenServer host, without
removing any of the SR contents. In both cases, the PBD of the SR must first be unplugged. Forgetting an
SR is the equivalent of the 
SR Detach operation within XenCenter.
1. Unplug the PBD to detach the SR from the corresponding XenServer host:
xe pbd-unplug uuid=
<pbd_uuid>
2. To destroy the SR, which deletes both the SR and corresponding PBD from the XenServer host database
and deletes the SR contents from the physical media:
xe sr-destroy uuid=
<sr_uuid>
3. Or, to forget the SR, which removes the SR and corresponding PBD from the XenServer host database
but leaves the actual SR contents intact on the physical media:
xe sr-forget uuid=
<sr_uuid>
Note:
It might take some time for the software object corresponding to the SR to be garbage collected.
Introducing an SR
Introducing  an  SR  that  has  been  forgotten  requires  introducing  an  SR,  creating  a  PBD,  and  manually
plugging the PBD to the appropriate XenServer hosts to activate the SR.
The following example introduces a SR of type lvmoiscsi.
1. Probe the existing SR to determine its UUID:
xe sr-probe type=lvmoiscsi device-config:target=
<192.168.1.10>
 \ 
device-config:targetIQN=
<192.168.1.10:filer1>
 \
device-config:SCSIid=
<149455400000000000000000002000000b70200000f000000>
2. Introduce  the  existing  SR  UUID  returned  from  the 
sr-probe  command.  The  UUID  of  the  new  SR  is
returned:
xe sr-introduce content-type=user name-label=
<"Example Shared LVM over iSCSI SR">
shared=true uuid=
<valid_sr_uuid>
 type=lvmoiscsi
3. Create a PBD to accompany the SR. The UUID of the new PBD is returned:
xe pbd-create type=lvmoiscsi host-uuid=
<valid_uuid>
 sr-uuid=
<valid_sr_uuid>
 \
device-config:target=
<192.168.0.1>
 \
device-config:targetIQN=
<192.168.1.10:filer1>
 \
device-config:SCSIid=
<149455400000000000000000002000000b70200000f000000>
4. Plug the PBD to attach the SR:
xe pbd-plug uuid=
<pbd_uuid>
5. Verify the status of the PBD plug. If successful the 
currently-attached
 property will be true:
xe pbd-list sr-uuid=
<sr_uuid>
Note:
Steps 3 through 5 must be performed for each host in the resource pool, and can also be performed using
the Repair Storage Repository function in XenCenter.