7.9 SCSI Lock
SCSI reservation agent can manage and protect the shared disks from the H/W perspectives.
If you use a SCSI reservation agent, you can safely protect the data disk against the split brain situations caused by external elements such as OS hanging.
If the shared storage supports SCSI3-PR (Persistent Reservation), you can use it together with SCSI reservation agent to improve the level of security for the shared data.
If you want to access the storage from systems (many or one) through SCSI3-PR, the system must have a storage reserved key. If not, storage access will not be granted.
* Note - If the storage does not support SCSI3-PR (Persistent Reservation), it cannot use a SCSI-reservation agent.
Table of Contents
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.
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.
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
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
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.
Configuration Sample
1. Shared disk and SCSI Lock resource is configured in same LUN.
[Figure] Shared disk and SCSI Lock resource configured in same LUN
First, register shared disk agent according to the procedure and after check if it works normally, check disk of SCSI Lock agent.
Registration Procedures
Install MCCS on both nodes
Set group
Add shared disk resource
Enable shared disk resource and check offline on both nodes
Add SCSI Lock resource (Select drive letter that created shared disk resource)
Enable SCSI Lock resource and check key in resource attribute of MCCS console.
Configure dependency of resources (SCSI Lock resource must go online first)
Test failover from node 2 to 1
Test failover from node 1 to 2
Set application that customer uses