XenServer – how to remove local SR

1. Fire display SR’s list (Storage Repository)

# xe sr-list
uuid ( RO)                : 252cf868-5ff7-5d06-5607-4b4ef111cdf8
          name-label ( RW): Local Storage 2
    name-description ( RW):
                host ( RO): rohan
                type ( RO): ext
        content-type ( RO): user

2. Next check used Physical Block Device (PBD). As SR-UUID set uuid from step 1.

# xe pbd-list sr-uuid=252cf868-5ff7-5d06-5607-4b4ef111cdf8
uuid ( RO)                  : f14bcade-bbf7-b5e3-c3ee-ba78e1559776
             host-uuid ( RO): abb746b2-03fb-410a-9e96-fc4ec1b64595
               sr-uuid ( RO): 252cf868-5ff7-5d06-5607-4b4ef111cdf8
         device-config (MRO): device: /dev/sdb
    currently-attached ( RO): true

3. Dismount PBD. As UUID set ID PBD from step 2.

# xe pbd-unplug uuid=f14bcade-bbf7-b5e3-c3ee-ba78e1559776

4. Remove PBD – UUID same as in step 3.

xe pbd-destroy uuid=f14bcade-bbf7-b5e3-c3ee-ba78e1559776

5. At last remove SR. SR’s UUID from step 1.

xe sr-forget uuid=252cf868-5ff7-5d06-5607-4b4ef111cdf8

Leave a Reply