Managing persistent reservations of target groups

SCSI-2 reservations allow initiators to gain exclusive access to a LUN and prevent other initiators from making changes to that LUN at the same time. Such reservations are typically released by the initiator after changes have been made to the LUN. They are, however, also released on initiator failures or logical unit resets. SCSI-3 introduces persistent reservations that remain in case of failures or resets and are released by the initiator when needed. They also allow multiple initiators to communicate with the LUN in a controlled manner.

In Virtuozzo Hybrid Infrastructure, persistent reservations are used mostly to support Microsoft Hyper-V nodes working in Failover Clusters.

SCSI persistent reservations are enabled by default. You can enable and disable them, for all volumes in the target group. Do the following:

# vstorage-target tg-pr -id <tg_ID> -enable
# vstorage-target tg-pr -id <tg_ID> -disable

Where <tg_ID> is the ID of the target group for which persistent reservations are set.

For persistent reservations to work, the vstorage-target-manager service must be running on all MDS nodes.