• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to add and remove local storage repository in xenserver

{{postValue.id}}

To add and remove local storage repository in xenserver

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. Steps to add and remove local storage repository in xenserver is explained in this article.


To Create storage repository

First create storage directory by using “ mkdir” command.

[root@xenSR-linuxhelp ~]# mkdir local
[root@xenSR-linuxhelp ~]# mkdir local/ISO

Then list the all storage repositories using “ xe sr-list” command like below.

[root@xenSR-linuxhelp ~]# xe sr-list
uuid ( RO)                : e6d251f9-365b-6d46-5d64-deb236540298
          name-label ( RW): DVD drives
    name-description ( RW): Physical DVD drives
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): iso

uuid ( RO)                : 0c7778a7-4c08-87d5-72bd-1020fdf445f4
          name-label ( RW): Local storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): ext
        content-type ( RO): user
uuid ( RO)                : efb3a8d3-b553-305d-b3aa-048147e895dc
          name-label ( RW): Removable storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): disk

uuid ( RO)                : 645fc1db-7400-03e6-c33c-0d16f325a229
          name-label ( RW): XenServer Tools
    name-description ( RW): XenServer Tools ISOs
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

Create storage repository by using following command..

[root@xenSR-linuxhelp ~]# xe sr-create name-label=repo-local type=iso device-config:legacy_mode=true device-config:location=/root/local/ISO content-type=iso
7ac13a79-e5ef-eb9f-d7f8-326d1bb228de

It creates a UUID for new storage repository.
1

Next list storage repository using “ xe sr-list ” command.

[root@xenSR-linuxhelp ~]# xe sr-list
uuid ( RO)                : e6d251f9-365b-6d46-5d64-deb236540298
          name-label ( RW): DVD drives
    name-description ( RW): Physical DVD drives
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): iso

uuid ( RO)                : 0c7778a7-4c08-87d5-72bd-1020fdf445f4
          name-label ( RW): Local storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): ext
        content-type ( RO): user

uuid ( RO)                : efb3a8d3-b553-305d-b3aa-048147e895dc
          name-label ( RW): Removable storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): disk

uuid ( RO)                : 645fc1db-7400-03e6-c33c-0d16f325a229
          name-label ( RW): XenServer Tools
    name-description ( RW): XenServer Tools ISOs
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

uuid ( RO)                : 7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
          name-label ( RW): repo-local
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

Check UUID for which storage repository you want to remove. By using “ xe sr-list name-label=” command.

[root@xenSR-linuxhelp ~]# xe sr-list name-label=repo-local
uuid ( RO)                : 7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
          name-label ( RW): repo-local
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

Check UUID for pbd of that selected storage repository. By using UUID of that local storage repo.

root@xenSR-linuxhelp ~]# xe pbd-list sr-uuid=7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
uuid ( RO)                  : 59679f4b-a66b-c621-3297-1990f2e467a9
             host-uuid ( RO): 1b2265f8-06fb-4980-8415-371e627efefb
               sr-uuid ( RO): 7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
         device-config (MRO): legacy_mode: true  location: /root/local/ISO
    currently-attached ( RO): true

This command shows UUID of “ repo-local” storage pbd. Pbd means physical block device. Storage repository directly connect to xensever with the help of pbd. Unplug the pbd of storage repo from xenserver. “ Xe pbd-unplug” command can help to unplug it.

[root@xenSR-linuxhelp ~]# xe pbd-unplug uuid=59679f4b-a66b-c621-3297-1990f2e467a9

2
Then run the following command to remove that storage repo.

[root@xenSR-linuxhelp ~]# xe sr-forget uuid=7ac13a79-e5ef-eb9f-d7f8-326d1bb228de

3
Here the uuid is the storage repository uuid.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is mean by the Virtual?

A

It's about the thing that not existing in physically and made by the application to do the same functionality as real.

Q

How can I create the storage repository in xen-server?

A

Run following command to create the storage repository as "xe sr-create name-label=repo-local type=iso device-config:legacy_mode=true device-config:location=/root/local/ISO content-type=iso

Q

It is advisable to make the changes in UUID for the particular virtual Disk in xen-server?

A

Duplicated UUID's can be a big problem on your machine. The most notable being your /etc/fstab file, which manages the mounting of partitions at boot time.

Q

What is mean by the "sr-list" that had mentioned in a document for xen-server?

A

It is nothing but server list in xen-server.

Q

Is it possible for able to suspend for the virtual disk in temporarily on xen-server?

A

You can't make the suspend functionality but still you can only to make the process of creating and delete the disk.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.