Friday 26 August 2011

XenServer - Remove Local Storage Repository


If you need to remove a local storage repository due to disk replacement/upgrade or failure then you need to perform the following CLI commands. This action cannot be done from the XenCentre Console as you might expect.


1. First, you have to determine the Storage-Repository-UUID:
xe sr-list
-> write down / take note of SR-UUID of the SR to delete

2. Find the corresponding Physical Block Device (PBD):
xe pbd-list sr-uuid=your-SR-uuid

-> write down / take note of PBD-UUID of the PBD to unplug and delete

3. Unplug the PBD:
xe pbd-unplug uuid=your-PBD-uuid

4. Delete PBD:
xe pbd-destroy uuid=your-PBD-uuid

5. Delete the association of your SR and the PBD:
xe sr-forget uuid=your-SR-uuid

No comments:

Post a Comment