How to remove a local Disk from a XenServer

Open the CLI and do the following:

  1. First we need to find the UUID of the SR to do this use the command:
    xe sr-list
  2. Take note of the UUID and paste it in to notepad.
    Now we need to find the Physical Block Device. To do this use the following command:
    xe pbd-list sr-uuid=your-SR-uuid-from-step-1
  3. We now need to unplug the PBD using the following command:
    xe pbd-unplug uuid=your-PBD-uuid-from-step-2
    Again once you have this paste it into notepad.
  4. We now need to delete the PBD using the following command:
    xe pbd-destroy uuid=your-PBD-uuid-from-step-2
  5. We now need to Delete the association of your SR and the PBD using the following command:
    xe sr-forget uuid=your-SR-uuid-from-step-1
    You will now see that your local SR has gone.
  6. Remove the physical Hard disk

CR: http://www.icsm.co.uk/faq/9-xen-server/16-how-to-remove-a-local-hard-disk-from-a-xenserver-host.html?pop=1&tmpl=component