7-8 SCSI Lock

7-8 SCSI Lock

 

How to work

Disk resource added through SCSI Lock agent has registration key for each node and it can be checked by it's attribute.
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 manages access control of shared disk through 'MOUNT/UMOUNT' command. 

  •  Data on the shared disks will be damaged if you try to access to write from multiple nodes.
    Thus, to control the situations, a shared disk agent maintains the umount condition, so that they can only mount the file system from an operation node but cannot access to write from a standby node. 

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

SCSI-Lock resource can be configured in 2 ways with shared disk resource. Configuration process changes according to the attribute value of SCSI Lock resource.

 

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

When you define an attribute of SCSI Lock resource as PrType=1, you can configure shared disk and SCSI Lock resource with the same LUN.
SCSI Lock agent manages DATA-DISK(shared disk resource) using by MOUNT/UMOUNT command and manages LOCK-DISK(SCSI Lock resource) using by SCSI-3 PR as shown below.
By setting up the dependency between SCSI Lock resources and shared disk resources, any damage of data-disk can be prevented which may occur in such case like Split-Brain.

[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)

At this type, shared disk agent manages DATA-DISK where user data is stored and SCSI lock agent uses exclusive LUN for key reservation. Therefore, two LUNs is required at least.
Lock-disk volume is created for 1:1 dependency with shared disk agent like a figure below.
By using multiple shared disk agents, and one SCSI reservation agent, you can configure the dependency relationship for use.
The storage capacity of this disk can be small 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)

 

DATA-DISK 

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

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.

 

 

Configuration Sample

1. Shared disk and SCSI Lock resource is configured in same LUN (PrType = 1)