XenServer

Local storage

A local storage repository (SR) is connected to a single host and is not shared between all hosts in a pool. The local physical storage hardware can be a hard disk drive (HDD) or a solid state drive (SSD) and connect to the host using any of the following methods: SATA, SCSI, SAS, NVMe.

XenServer® hosts support the following types of local storage:

XenServer also uses the udev type to represent devices plugged in as VDIs. For more information, see udev.

Note:

Local SRs of type lvm, ext, and xfs can only be created using the xe CLI. After creation, you can manage all SR types by either XenCenter or the xe CLI.

Local LVM

The Local LVM type presents disks within a locally attached Volume Group. We recommend that you only attach one local SR per host. The maximum VDI size for this SR is 2,040 GiB.

By default, XenServer uses the local disk on the physical host on which it is installed. The Linux Logical Volume Manager (LVM) is used to manage VM storage. A VDI is implemented in VHD format in an LVM logical volume of the specified size.

Note:

The block size of an LVM LUN must be 512 bytes. To use storage with 4 KB physical blocks, the storage must also support emulation of 512-byte allocation blocks (the logical block size must be 512 bytes).

LVM performance considerations

The snapshot and fast clone functionality for LVM-based SRs comes with an inherent performance overhead. When optimal performance is required, XenServer supports the creation of VDIs in the raw format in addition to the default VHD format. The XenServer snapshot functionality is not supported on raw VDIs.

Warning:

Do not try to snapshot a VM that has type=raw disks attached. This action can 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.

Creating a local LVM SR

An LVM SR is created by default on host install.

Device-config parameters for LVM SRs are:

Parameter Name Description Required?
device Device name on the local host to use for the SR. You can also provide a comma-separated list of names. Yes

To create a local LVM SR on /dev/disk/<id>, use the following command.

    xe sr-create host-uuid=valid_uuid content-type=user \
    name-label="Example Local LVM SR" shared=false \
    device-config:device=/dev/disk/<id> type=lvm
<!--NeedCopy-->

Local EXT3/EXT4

Using EXT3/EXT4 enables thin provisioning on local storage. However, the default storage repository type is LVM as it gives a consistent write performance and prevents storage over-commit. The maximum VDI size for this SR is 2,040 GiB.

If you use EXT3/EXT4, you might see reduced performance in the following cases:

  • When carrying out VM lifecycle operations such as VM create and suspend/resume
  • When creating large files from within the VM

Local disk EXT3/EXT4 SRs must be configured using the XenServer CLI.

Whether a local EXT SR uses EXT3 or EXT4 depends on what version of XenServer created it:

  • If you created the local EXT SR on an earlier version of Citrix Hypervisor or XenServer and then upgraded to XenServer 8.4, it uses EXT3.
  • If you created the local EXT SR on XenServer 8.4, it uses EXT4.

Note:

The block size of an EXT3/EXT4 disk must be 512 bytes. To use storage with 4 KB physical blocks, the storage must also support emulation of 512-byte allocation blocks (the logical block size must be 512 bytes).

Creating a local EXT4 SR (ext)

Device-config parameters for EXT SRs:

Parameter Name Description Required?
device Device name on the local host to use for the SR. You can also provide a comma-separated list of names. Yes

To create a local EXT4 SR on /dev/disk/<id>, use the following command:

    xe sr-create host-uuid=valid_uuid content-type=user \
       name-label="Example Local EXT4 SR" shared=false \
       device-config:device=/dev/disk/<id> type=ext
<!--NeedCopy-->

Local XFS

Using XFS enables thin provisioning on local storage. The local XFS type allows you to create local storage devices with 4 KB physical blocks without requiring a logical block size of 512 bytes. The maximum VDI size for this SR is 16 TiB.

Constraints

XFS SRs have the following constraints:

  • Storage migration (live or offline) cannot be used on VMs whose VDIs are on an XFS SR. However, you can manually copy VDIs between SRs.

  • IntelliCache™ is not supported for VMs using an XFS SR.

  • The Software FCoE transport is not supported with XFS SRs (for fully offloaded FCoE use HBA).

  • Trim/unmap is not supported on XFS SRs.

  • You cannot export VDIs that are greater than 2 TiB as VHD or OVA/OVF. However, you can export VMs with VDIs larger than 2 TiB in XVA format.

Creating a local XFS SR

Device-config parameters for XFS SRs:

Parameter Name Description Required?
device Device name on the local host to use for the SR. You can also provide a comma-separated list of names. Yes

To create a local XFS SR on /dev/disk/<id>, use the following command:

    xe sr-create host-uuid=valid_uuid content-type=user \
       name-label="Example Local XFS SR" shared=false \
       device-config:device=/dev/disk/<id> type=xfs
<!--NeedCopy-->

udev

The udev type represents devices plugged in using the udev device manager as VDIs.

XenServer has two SRs of type udev that represent removable storage. One is for the CD or DVD disk in the physical CD or DVD-ROM drive of the XenServer host. The other is for a USB device plugged into a USB port of the XenServer host. VDIs that represent the media come and go as disks or USB sticks are inserted and removed.

Local storage