Recently when implementing Citrix Xenserver infrastructure, I had couple of CIFS shares mounted and those shares were deleted from windows system. When tried to remove it from Xencenter, it didnt work out. This can be used for any type of SR.
Used below commands to get rid of it,
- Determine the Storage-Repository-UUID and make the note of the appropriate SR ID
xe sr-list
- Find the corresponding Physical Block Device (PBD)
xe pbd-list sr-uuid=your-SR-uuid
- Unplug the PBD
xe pbd-unplug uuid=your-PBD-uuid
- Delete PBD
xe pbd-destroy uuid=your-PBD-uuid
- Delete the association of your SR and the PBD
xe sr-forget uuid=your-SR-uuid
Hope this helps, write comments for any questions.