Configure SCSI3-Persistent Reservation for virtual machines
By using SCSI3-Persistent Reservation (S3-PR), multiple virtual machines (VMs) can coordinate access to shared storage devices. This is required for Linux clustering solutions, such as Pacemaker, and for Windows Server Failover Clustering.
Before you begin
- The host uses one of the following CPU architectures:
- Intel 64
- AMD64
- ARM 64
- The host uses a supported RHEL and kernel version. For details, see Required RHEL versions for SGIO support in Virtual Machines.
- The storage back end supports S3-PR.
- If using multipathed virtual disks (vDisks), the multipath configuration is properly configured on the host. For details, see Configuring device mapper multipath.
About this task
With S3-PR, VMs can register and manage persistent reservations on storage devices to prevent conflicts when multiple VMs access the same storage.
You can configure S3-PR for both singlepath and multipath devices in VMs running on a RHEL host by modifying their XML configuration files.
Procedure
Results
- You can verify the configuration on the host by displaying the XML configuration of the running VM.
# virsh dumpxml <vm_name>Look for the
reservations managed='yes'element in the disk device configuration. - In RHEL VMs, you can also use the
sg3_utilspackage to check the persistent reservation capabilities of the SCSI device:- Install the
sg3_utilspackage in the RHEL VM:# dnf install sg3_utils - Check the SCSI device’s persistent reservation capabilities:
# sg_persist --in --report-capabilities /dev/sdaIf the device supports S3-PR, the output looks similar to the following:
LBP-2: 0 PTPL_C: 0 TMC: 0 [PTPL_A: 1] [PR_TYPE: 1, 3, 5]In this example,
PTPL_A: 1indicates that the device supports persistent reservations, andPR_TYPE: 1, 3, 5shows the supported reservation types.
- Install the