Helpful SR CLI commands

Helpful SR CLI commands

book

Article ID: CTX220536

calendar_today

Updated On:

Description

Probe the SR:

xe sr-probe type=lvmohba device-config:device=/dev/disk/by-id/scsi-<your scsi id>

xe sr-probe type=lvmoiscsi device-config:target=<device ip> device-config:targetIQN=<iqn>

xe sr-probe type=nfs device-config:server=<device ip> device-config:serverpath=/path/to/export

Introduce the existing SR to XenServer:

xe sr-introduce uuid=<device uuid> shared=true type=lvmohba name-label=<name>

xe sr-introduce uuid=<device uuid> shared=true type=lvmoiscsi name-label=<name>

xe sr-introduce uuid=<device uuid> shared=true type=nfs name-label=<name> 

Create a PBD for each host in the pool:

**HBA**   xe pbd-create sr-uuid=<device uuid> device-config:device=/dev/disk/by-id/scsi-<scsi id> host-uuid=<host uuid>

**ISCSI** xe pbd-create sr-uuid=<device uuid> host-uuid=<host uuid> device-config:target=<device ip> device-config:targetIQN=<iqn> device-config:SCSIid=<scsi id>

**NFS**   xe pbd-create sr-uuid=<uuid> host-uuid=<uuid> device-config:server=<device ip> device-config:serverpath=/path/to/export

Plug in the new PBD:

xe pbd-plug uuid=<pbd uuid>

Scan the SR:

xe sr-scan uuid=

You should now see the SR enabled in XenCenter and you can rescan it under Storage tab to show all existing virtual disks.

Issue/Introduction

List of helpful commands for shared storage