Cloudstack creation of primary storage failed (SR already used), successful removal of SR
As a result of the recent engineering need to use this thing, so, on the Internet to find some information to solve the cloudstack to create primary storage failed (SR has been used), delete the SR after the success of the problem, here is recorded:
When creating a primary store, the creation of a storage pool failure may occur (the SR has been used, this problem may occur after reloading Cloudstack management), and the error prompts are as follows:
Can not create storage pool through host 1 due to Catch Exception
com.cloud.utils.exception.CloudRuntimeException, CRE Ate Storagepool failed due to
com.cloud.utils.exception.CloudRuntimeException:
There is a SR using the same confi Guration server:10.217.5.192, serverpath:/home/export/primary for
pool C9c0319f-33f0-3494-9ada-4d7a2f1dafd4on Host:09b3515e-447e-406f-869a-239386d5fe90 on
host:09b3515e-447e-406f-869a-239386d5fe90 pool:10.217.5.192/ Home/export/primary
The reason for failure is usually because the CS has been created in the host. It is no problem to remove the C9C0319F-33F0-3494-9ADA-4D7A2F1DAFD4 SR from the 09B3515E-447E-406F-869A-239386D5FE90 host before reloading and then create the primary storage.
Removing the SR method in XenServer is as follows
1. First get the UUID of the SR
Xe Sr-list Name-label=c9c0319f-33f0-3494-9ada-4d7a2f1dafd4
2. Use the UUID to get a list of physical block devices, there may be multiple.
Xe Pbd-list sr-uuid= sr-uuid-from-step-1
3. Uninstall physical block device, if there are multiple, need to perform multiple
Xe Pbd-unplug uuid=pbd-uuid-from-step-2
4. Destruction of physical block equipment, if there are multiple, need to perform multiple
Xe Pbd-destroy uuid=pbd-uuid-from-step-2
5. Remove SR
Xe Sr-forget uuid=sr-uuid-from-step-1
In addition, this issue can be queried for the SR (select UUID from Storage_pool) in Storage_pool before reinstalling, and then to remove the associated SR from the corresponding host (usually SSVM host).
Thank you for reading, I hope to help you, thank you for your support for this site!