CloudStack creates a primary storage failure solution

  • 2020-05-24 06:31:17
  • OfStack

CloudStack failed to create the primary store (SR is already in use), succeeded after removing SR

Due to the need of this item in the recent project, I found some information on the Internet to solve the problem of CloudStack failed to create the main storage (SR has been used) and succeeded after deleting SR. Here is the record:

When creating the primary storage, a failure to create the pool storage may occur (SR has been used, this problem may occur after reinstalling CloudStack management). The error is as follows:


 Can not create storage pool through host 1 due to Catch Exception 
com.cloud.utils.exception.CloudRuntimeException, create StoragePool failed due to
 com.cloud.utils.exception.CloudRuntimeException:
 There is a SR using the same configuration 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 CS has already been created in host, To reinstall UUID to 09 before a f e b3515e - 447-406-869-239386 d5fe90 delete c9c0319f host - 33 f0-3494-9 ada - 4 d7a2f1dafd4 SR, then create a main storage, there is no problem.

Delete SR in XenServer as follows

1. First get UUID of SR

xe sr-list name-label=c9c0319f-33f0-3494-9ada-4d7a2f1dafd4

2. Use UUID to get a list of physical block devices, possibly more than one.

xe pbd-list sr-uuid= SR-uuid-from-step-1

3. Uninstall the physical block device. If there are more than one, it needs to be executed several times

xe pbd-unplug uuid=PBD-uuid-from-step-2

4. Destroy physical block devices. If there are more than one, it shall be executed several times

xe pbd-destroy uuid=PBD-uuid-from-step-2

5. Delete SR

xe sr-forget uuid=SR-uuid-from-step-1

In addition, this problem can be checked out SR (select uuid from storage_pool;) in storage_pool before reinstallation. , and then delete the SR in host (usually SSVM in host).

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: