How to delete a storage warehouse from the xenserver host when a storage warehouse is faulty or you want to stop using a storage warehouse.
Background
Xenserver's storage warehouse is used to store iso or VDI. A storage warehouse is connected to xenserver through a physical block device (PBD). PBD contains the configuration information of the storage warehouse (SR. Before you detach or delete the Sr from the xenserver host, it is necessary to disconnect PBD first.
Procedure
To delete an SR from a xenserver host, complete these steps:
1. Right click the storage repository and selectDetach. If detach is not an option then the storage repository is in use (DVD loaded on Virtual Machine for ISO or virtual machine running for storage SR ).
Complete the following procedure if you have detached all the ISOs in your DVD drives and stopped all virtual machines with vdis running on storage repository. Right-click the corresponding Sr and select detach. If detach is not an option, this Sr is in use (for ISO-type SRS, there are DVDs mounted, or virtual machines running on them ). If you have detached the ISO from all DVD drivers and stopped all VMS running on this Sr, complete the following steps.
1. Run the following command to determine the sr uuid:
Xe Sr-list name-label = <name of the SR>.
Note:: You can also select the corresponding SR on xencenter and then select the "General" option to find the corresponding UUID In the uuid field.
650) This. width = 650; "style =" padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-Right: 0px; font-family: Inherit; padding-top: 0px; "border =" 1 "alt =" Weight: http://support.citrix.com/article/html/images/CTX131328-1.gif "src =" http://support.citrix.com/article/html/images/CTX135088-3.gif "Height =" 381 "/>
1. Run the following command to determine the uuid corresponding to PBD:
Xe PBD-list sr = <uuid of Sr>
650) This. width = 650; "style =" padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-Right: 0px; font-family: Inherit; padding-top: 0px; "border =" 1 "alt =" Weight: http://support.citrix.com/article/html/images/CTX131328-2.gif "src =" http://support.citrix.com/article/html/images/CTX135088-4.gif "Height =" 135 "/>
1. Run the following command:
Xe PBD-unplug UUID = <UUID of PBD>
650) This. width = 650; "style =" padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-Right: 0px; font-family: Inherit; padding-top: 0px; "border =" 1 "alt =" Weight: http://support.citrix.com/article/html/images/CTX131328-3.gif "src =" http://support.citrix.com/article/html/images/CTX135088-5.gif "Height =" 32 "/>
1. Run the following command:
Sr-Forget UUID = <uuid of Sr>
Note:: You can also right-click the corresponding SR on the xencenter. If forget is optional, click forget. 650) This. width = 650; "style =" padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-Right: 0px; font-family: Inherit; padding-top: 0px; "border =" 1 "alt =" Weight: http://support.citrix.com/article/html/images/CTX131328-4.gif "src =" http://support.citrix.com/article/html/images/CTX135088-6.gif "Height =" 36 "/>
1. This Sr will be removed from xencenter and xenserver.
Note:: If an error message is displayed when the SR is deleted, check/var/log/messages. * log or/var/log/smlog .*.
If an error is reported:
Error code: sr_backend_failure_74
Error Parameters:, NFS unmount error [opterr = error is 255]
Unmount NFS first
Run the following command:
Unmount-F-L/var/run/Sr-mount /***
This article is from the "Sim 'blog" blog, please be sure to keep this source http://mitac.blog.51cto.com/1081911/1558008
How to delete a storage warehouse from xenserver