How to Remove a Storage Repository from XenServer

How to Remove a Storage Repository from XenServer

book

Article ID: CTX131328

calendar_today

Updated On:

Description

This article describes how to remove a Storage Repository (SR) on a XenServer host when the Storage Repository is experiencing issues, or if you wish to discontinue using the Storage Repository.

A XenServer Storage Repository is used to Store ISOs or Virtual Machine (VM) Virtual Disks (VDIs). The Storage Repository is connected to a XenServer through a Physical Block Device (PBD) which contains the configuration for the Storage Repository. It is necessary to disconnect the PBD before you detach or remove the Storage Repository from the XenServer host.


Instructions

To remove a Storage Repository from the XenServer host, complete the following procedure:

  1. Right click the Storage Repository and select Detach. 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 only after you have either ensured that no VM has an ISO mounted to its 'DVD drive' or that you have stopped all Virtual Machines with VDIs running on Storage Repository.

  2. Run the following command to identify the Storage Repository UUID:
    xe sr-list name-label=<Name of the SR>.
    Note: You can select the Storage Repository and select the General tab and locate the UUID in the UUID field.

    User-added image

  3. Run the following command to find the UUID of the PBD :
    xe pbd-list sr-uuid=<UUID of SR>

    User-added image

  4. Run the following command:
    xe pbd-unplug uuid=<UUID of PBD>

    User-added image

  5. Run the following command:
    xe sr-forget uuid=<UUID of SR>
    Note
    : You can right click the Storage Repository on the XenCenter Interface and select Forget if it is an option.

    User-added image

  6. The Storage Repository will be removed from the XenCenter and XenServer host.
    Note: If an error message is displayed while removing the Storage Repository, check the /var/log/messages.* log or /var/log/SMlog.*

Issue/Introduction

This article describes how to remove a Storage Repository in XenCenter for XenServer host.