7-8 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
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.
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.
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
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
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
[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 device path that created shared disk resource)
Enable SCSI Lock resource and check key in resource attribute of MCCS web 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
Adding
Add the SCSI reservation application resource to a group.
Before configuring the SCSI reservation resource, you must configure the volume in advance by using the SCSI3 supporting storage.