Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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.
Info |
---|
An environment where only shared disk agent is used
|
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.
Info |
---|
Disk management function in software perspective (shared disk agent)
Disk management function in hardware perspective (SCSI Lock agent)
|
2. Both 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).
Info |
---|
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)
Info |
---|
Meaning of DATA-DISK
Meaning of LOCK-DISK
|
Configuration Sample
1. Shared disk and SCSI Lock resource is configured in same LUN (PrType=1)
[Figure] Shared disk and SCSI Lock resource configured in same LUN
First, register shared disk agent 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 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
2. Shared disk and SCSI Lock resource configured with different LUN (PrType=3)
[Figure] Shared disk and SCSI Lock resource configured with different LUN
First, register shared disk agent according to the procedure and after check if it works normally, check disk of SCSI Lock agent.
- 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 new drive letter, not from the one in shared disk resource)
- Enable SCSI Lock resource and check Key in resource attribute in MCCS Console
- Change PrType 1 to 3 for attribute of SCSI Lock resource. (When SCSI Lock resource is added, make sure that SCSI Lock Disk Letter are disappeared from Windows Explorer of both servers.)
- Configure dependency of resources (SCSI Lock resource must go online first)
- Test failover from node2 to 1
- Test failover from node1 to 2
- Customer applications that use the volume setting
Adding
There are two way to add a resource which one is select this from a group name and another is select this from a resource type.
Adding in Group
- Select a group → right click → 'Add Resource'.
[Figure] Adding Resource in a group - Select 'Service' from Resource Type lists and click 'Next' button.
[Figure] Select Resource Wizard View - Next steps are same as adding in resource type.
Adding in Resource Type
- ResourceType → Right Click → Click Add Resource
[Figure] Adding Resource in a resource type - Getting disk information.
[Figure] Screen of Getting disk information. - DriveLetter to be used for SCSILock can be selected.
[Figure] Selecting driver letter View - When there is no disk for SCSI Lock resource, "Disk Not Found" message appears.
[Figure] Disk Not Found - Enter resource name. If you skip enter resource name, this will be given 'SLock_value' which value is selected driver letter.
[Figure] Selecting driver letter View - Click 'Finish' and SCSI Lock resource is added.
[Figure] Adding SCSI Lock resource is completed
Deleting
Select resource type → right click → delete resource.
Select Select "Delete Resource".
[Figure] Delete SCSI Lock resource view
Status
The following table explains the status switching of the MCCS resource caused by a user's command and the status.
The command assumes that it is generated by a user.
SCSI reservation agent: Manages the SCSI reservation disk.
Status | Agent command | Description | Note |
---|---|---|---|
Online Disk key is exclusively reserved at an online node. | Offline | It switches to offline while maintaining the reservation. | |
Monitoring | Check if there is a reservation made on the disk. | ||
Offline 1. Disk is reserved but the resource is still offline. | Online | Register a key for a disk reservation and wait for a response from the other node. | |
Monitoring | Check if there is a reservation made on the disk. | ||
Trouble It occurs when a reservation is stolen while going online. | Online | Register a key for a disk reservation and wait for a response from the other node. | |
Offline | It switches to offline while maintaining the reservation. |
Attribute
[Figure] SCSI Lock Resource Attribute view
SCSI Lock resource provides the following detailed attributes as well.
Setting are available in "Resource Unique Attribute" in resource's attribute tab.
Each attribute value has the following meanings:
Attribute | Description | Type | Default | Edit | Note |
DiskDUID | DUID(Device Unique ID, 16 byte as Hex value) of disk is used as identifier. Specify DUID of reserve disk. | STRING | X | ||
DriveLetter | Disk to be used for reservation is specified by drive letter. | STRING | X | ||
Key | MAC address is used as Reserved-Key. This key is automatically set by agent. | STRING | |||
PreemptWaitCount | Time waiting for permission of other node before reservation | INTEGER | 2 times | O | |
PrType | This attribute decides on how to give the permission of reserve disk access as Persist Type specified in SCSI3-PR spec. | INTEGER | Prtype=1 | O |
scsicmd.cmd Command
Syntax
Code Block |
---|
scsicmd [option] [diskID] |
Option
This is the utility to use SCSI 3 PR command more easily. Following is the provided options
Option | Description |
-c diskId | It deletes Reserved-Key and Registered-Key of local node of disk. |
-cf diskId | It forcely deletes Reserved-Key and Registered-Key of local node of disk. |
-r diskId | Registers diskld-specified disk. |
-l diskId | If node is yet to reserve, close the specified disk and reserve. |
-lf diskId | It forcelu closes specified disk and reserve, even node has been reserved. |
-h | It shows help of scsicmd. |
no option | It shows the state information regarding disk reservation when there is no other option. |
Print Sample
Panel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The output of 'scsicmd' command from source node (C29043F13 is MAC Address of NIC from source node.)
The output of 'scsicmd' command from target node (C29043F13 is MAC Address of NIC from source node.)
|
Disk 0 (C:)'s PR is set to "No". So, you can see that the disk does not support SCSI3-PR. (In general, the "C" drive is the system booting disk and it does not support SCSI.)
Besides, Disk 1 (D:)'s PR is set to "No". You can see that the disk does not support SCSI3-PR.(Internal Disk does not support SCSI3-PR.)
Disk 2 (E:) and Disk 4 (G:)'s SCSI3-PR is set to "Yes". So, it means that the storage used supports SCSI3- PR. Their Reserved-Key and Registered-Keys are set to "none". It means that they are not yet to be registered.
Disk 3 (F:)'s Reserved-Key and Registered-Keys at the source node are set to C29043F13* and C29043F13* and at the target node to C29043F13 and C29043F13. This means that a SCSI reservation agent was used to create the resource.
The (*) marked node with the Reserved-Key and Registered-Keys indicates that a disk is reserved. In addition, only the * marked node with the Reserved-Key value (ex: C29043F13*) can access the disk.