7.9 SCSI Lock

7.9 SCSI Lock

How to work

The resource created by a SCSI reservation agent will have a registered key for each node. You can check it in the attributes.
For an online node, set its own registration key as the reservation key.
SCSI reservation agent uses the reservation keys to differentiate nodes that can be accessed and determine whether disk access should be granted.
To be able to safely protect the systems shared data against the Split-Brain situations, you should define the dependency between the SCSI reservation resource and the shared disk resource.

 

 

Requirement

External storage must support SCSI-3 PR.
Volume should be configured by LUN(Logical Unit Number) unit. Partitioned volume in a LUN is not supported.
If use PrType 3, at least 1GByte LUN is needed for key reservation.

 

 

Types of Shared disk resource

To configure HA with shared storage environment, MCCS provides shared disk agent and SCSI Lock agent.
You can use only shared disk resource, or use with SCSI Lock resource. Shared disk resource depends on SCSI Lock resource and multiple shared disk resource can depends on a SCSI Lock resource.

An environment where only shared disk agent is used

  • The disk volume is partitioned in a LUN.

  • External storage does not support SCSI-3 PR.

 

Difference between shared disk agent and SCSI Lock agent
1. Shared disk agent manage disk access in local node, but SCSI Lock agent manage node access in storage.

Disk management function in software perspective (shared disk agent)

  • Shared disk agent manage access control of shared disk through Mantech Volume Lock (MVL) kernel driver. 

  • Data will be corrupted if writing access is done from multiple nodes in shared disk. MVL locks access to the shared disk resource. You cannot access the volume of shared disk before it unlocks access. Only a node allow to access to the shared disk resource by this.

  • MVL can be managed both in LUN unit and partition unit.

Disk management function in hardware perspective (SCSI Lock agent)

  • SCSI Lock agent manage Write control and access control of LUN by using SAN protocol.

  • Only the node that has imported the disk with this key can access to the disk.



2. Both the shared disk agent and the SCSI reservation agent can read and write data.
However, a SCSI reservation agent intends to protect the shared storage resource, so you are not recommended to use it alone to read and write data.
Thus, a SCSI reservation agent can be used together with a shared storage agent or can use a separate LUN from the shared storage (PrType option). 

PrType (Persist Type) 1 : Type1 controls 'Write" of LUN. When use this option, shared disk resource can be used as lock disk. (Exclusive Write)

PrType (Persist Type) 3 : Typ3 controls "Access" of LUN. When use this option, exclusive LUN is needed for lock disk

Small disk capacity of about 1GB is available. But the content is not protected.

 

 

Configuration

 

There are two different ways to configure the SCSI reservation agent resource and the shared disk agents resource. It depends on the attribute of the SCSI reservation agent resource.

 

1. When shared disk and SCSI Lock resource is configured with the same LUN (PrType=1)

In the SCSI reservation agent resource, use the option of PrType = 1. In this case, LUN will be used to configure the shared disk resource and the SCSI reservation resource.
A shared disk agent uses the MVL driver to manage DATA-DISK and a SCSI reservation agent uses the SCSI3-PR function to manage LOCK-DISK.
By setting the dependency between the SCSI reservation resource and the shared disk resource, you can prevent damages to DATA-DISK caused by Split-Brains and so on.

[Figure] Shared disk and SCSI Lock resource configured in same LUN (PrType=1)

 

 

2. Shared disk and SCSI lock resource is configured with different LUN (PrType=3)

A shared disk agent manages DATA-DISK on the single drive character basis, and a SCSI reservation agent manages the standalone LUN exclusively for LOCK-DISK.
For this configuration, there must be at least two LUN segments existing on the shared disk.
As shown below, create the LOCK-DISK volume that will depend on a shared disk agent in a 1:1 relationship.
By using multiple shared disk agents, and one SCSI reservation agent, you can configure the dependency for use.
This disk with small capacity is allowed because it is used to check the node that can access the storage.
By setting the dependency between the SCSI reservation resource and the shared disk resource, you can prevent damages to DATA-DISK caused by Split-Brains and so on.

[Figure] Shared disk and SCSI Lock resource is configured with different LUN( PrType=3)

 

Meaning of DATA-DISK

  • It is a disk created by using a shared disk agent. It represents a disk where the actual user data is used.  

Meaning of LOCK-DISK

  • It is a disk created by using a SCSI reservation agent.
    This is the disk that depends on DATA_DISK used in the shared disk when linking a shared disk agent.