50
There are two basic steps involved in creating a new storage repository for use on a XenServer host using the CLI:
1. Probe the SR type to determine values for any required parameters.
2. Create the SR to initialize the SR object and associated PBD objects, plug the PBDs, and activate the SR.
These steps differ in detail depending on the type of SR being created. In all examples the sr-create command
returns the UUID of the created SR if successful.
SRs can also be destroyed when no longer in use to free up the physical device, or forgotten to detach the SR from
one XenServer host and attach it to another. See the section called “Destroying or Forgetting a SR” for details.
Note:
When specifying StorageLink configuration for a XenServer host or pool, supply either
the default credentials of username: admin and password: storagelink, or any
custom credentials specified during installation of the StorageLink Gateway service. Unlike
StorageLink Manager, XenCenter does not supply the default credentials automatically.
Upgrading LVM Storage from XenServer 5.0 or Earlier
See the XenServer Installation Guide for information on upgrading LVM storage to enable the latest features.
Local, LVM on iSCSI, and LVM on HBA storage types from older (XenServer 5.0 and before) product versions will
need to be upgraded before they will support snapshot and fast clone.
Warning:
SR upgrade of SRs created in version 5.0 or before requires the creation of a 4MB metadata
volume. Please ensure that there are at least 4MB of free space on your SR before attempting
to upgrade the storage.
Note:
Upgrade is a one-way operation so Citrix recommends only performing the upgrade when
you are certain the storage will no longer need to be attached to a pool running an older
software version.
LVM Performance Considerations
The snapshot and fast clone functionality provided in XenServer 5.5 and later for LVM-based SRs comes with an
inherent performance overhead. In cases where optimal performance is desired, XenServer supports creation
of VDIs in the raw format in addition to the default VHD format. The XenServer snapshot functionality is not
supported on raw VDIs.
Note:
Non-transportable snapshots using the default Windows VSS provider will work on any type
of VDI.
Warning:
Do not try to snapshot a VM that has type=raw disks attached. This could result in a
partial snapshot being created. In this situation, you can identify the orphan snapshot VDIs
by checking the snapshot-of field and then deleting them.

VDI Types

In general, VHD format VDIs will be created. You can opt to use raw at the time you create the VDI; this can only be
done using the xe CLI. After software upgrade from a previous XenServer version, existing data will be preserved
as backwards-compatible raw VDIs but these are special-cased so that snapshots can be taken of them once you
have allowed this by upgrading the SR. Once the SR has been upgraded and the first snapshot has been taken,
you will be accessing the data through a VHD format VDI.