Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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. Online node sets its Registered-key as Reserved-Key.
온라인 노드는 자신의 등록 키를 예약 키로 설정합니다.
스카시예약 에이전트는 설정된 예약 키로 디스크의 접근할 수 있는 노드를 구별하여 디스크의 접근 허용 여부를 결정합니다.
Split-Brain 상황에서도 시스템간 공유된 데이터를 보다 안전하게 관리할 수 있도록 스카시예약 리소스와 공유디스크 리소스 간에 의존성을 설정합니다.
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.
...
Info |
---|
Disk management function in software perspective (shared disk agent)
Disk management function in hardware perspective (SCSI Lock agent)
|
2. 공유디스크 에이전트, 스카시예약 에이전트 모두 데이터를 읽고 쓸 수 있습니다.
그러나 스카시예약 에이전트는 공유스토리지 리소스 보호가 목적이기 때문에 단독 사용하여 데이터를 읽고 쓰는 방법을 권장하지 않습니다.
그래서 스카시예약 에이전트는 공유스토리지 에이전트와 함께 사용하거나, 공유 스토리지와 별개의 LUN 을 사용하는 옵션(PrType)을 지원합니다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) 디스크는 작은 용량(약 1GB)으로도 가능하며 내용은 보호하지 않습니다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.
...
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.
공유디스크 에이전트 다수와 스카시예약 에이전트 1개를 이용해, 의존관계를 구성하여 사용할 수도 있습니다
이 디스크는 스토리지에 접근할 수 있는 노드 확인에 이용하기 때문에 크기가 작아도 됩니다.
스카시예약 리소스와 공유디스크 리소스 간의 의존관계를 설정함으로써, Split-Brain과 같은 상황에서 발생하는 DATA-DISK의 손상을 방지할 수 있습니다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)
Info |
---|
DATA-DISK
LOCK-DISK
|
Configuration Sample
1. Shared disk and SCSI Lock resource is configured in same LUN (PrType = 1)
...
- When add a resource from a group name, select a group -> → right click -> → 'Add Resource'.
[Figure] Adding Resource in a group - Select 'SCSILOCK' 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 - 정보를 모두 가져오면 스카시예약 리소스로 사용할 장치경로를 선택할 수 있습니다 If all the information is retrieved, you can select a device path used as the SCSI reservation resource.
[Figure] Selecting driver letter View - When there is no disk for SCSI Lock resource, "Disk Not Found" message appears.
[Figure] Disk Not Found - 스카시예약 리소스에 사용할 장치경로를 선택하면 자동으로 권장이름을 제공해줍니다 If you select a device path used for the SCSI reservation resource, a name will be automatically recommended.
[Figure] Select device path - Click 'Finish' and SCSI Lock resource is added.
[Figure] Adding SCSI Lock resource is completed
Deleting
Select resource type - → right click - → delete resource.
- Select "Delete Resource".
[Figure] Delete SCSI Lock resource view
State
다음 테이블은 상태와 사용자 명령에 의해 발생되는 MCCS 리소스의 상태 이동에 대해 설명합니다.
명령은 사용자에 의해 발생되는 것을 전제로 합니다.
스카시예약 에이전트: 스카시 예약 디스크를 관리합니다.
...
온라인
온라인 된 노드에서 디스크의 키가 배타적으로 예약된 상태입니다.
다른 노드에서는 키를 등록 할 수 없습니다.
...
보관중인 예약키를 무시하고 새로 예약키를 만든 후 예약을 유지한 상태로 오프라인으로 전환합니다.
...
디스크에 예약된 키를 비교하여 예약이 걸려있는지 확인합니다.
...
오프라인
1. 디스크가 예약은 되어 있지만 리소스 상태는 오프라인 상태입니다.
2. 상대 노드가 예약을 가져간 실질적인 오프라인 상태입니다.
...
디스크 예약을 위해 키를 등록하고 상대 노드의 응답을 대기합니다.
한 번 온라인한 이후에는 상대 노드의 예약을 빼앗아 오는 형태(preempt)로 온라인이 진행됩니다.
...
디스크에 예약된 키를 비교하여 예약이 걸려있는지 확인합니다.
...
장애
온라인 중 예약을 빼앗긴 경우에 발생합니다.
...
디스크 예약을 위해 키를 등록하고 상대 노드의 응답을 대기합니다.
한 번 온라인한 이후에는 상대 노드의 예약을 빼앗아 오는 형태(preempt)로 온라인이 진행됩니다.
...
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 ignores the reservation key stored. It first creates a new reservation key and switches to offline while maintaining the reservation. | |
Monitoring | Compares the key reserved in the disk and 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. After going online once, the other node reservation is stolen. This is called preempt. | |
Monitoring | Compares the key reserved in the disk and 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. After going online once, the other node reservation is stolen. This is called preempt. | |
Offline | It ignores the reservation key stored. It first creates a new reservation key and switches to offline while maintaining the reservation. |
Attribute
[Figure] SCSI Lock Attribute view
...
Code Block |
---|
scsicmd [option] [devicePath] |
...
Options
This is the utility to use SCSI 3 PR command more easily. Following is the provided options
옵션Option | 설명Description |
-c devicePath | It deletes Reserved-Key and Registered-Key of local node of disk. |
-cf devicePath | It forcely deletes Reserved-Key and Registered-Key of local node of disk. This is mostly used when access to disk is inavailable. |
-r devicePath | Registers diskld-specified disk. |
-l devicePath | If node is yet to reserve, close the specified disk and reserve. |
-lf devicePath | It forcelu closes specified disk and reserve, even node has been reserved. Meaning, it takes over other reservation. |
-h | It shows help of scsicmd |
no option | It shows the state information regarding disk reservation when there is no other option. |
...
Since '/dev/sda' is set as "No"in PR, it shows this does not support SCSI-3 PR. (Normally '/dev/sda' is Booting disk in local node and may dose not support this in many case.)
Also, '/dev/sdb' is set as "No" in PR. It shows this also does not support SCSI-3 PR. (Normally, Internal Disk does not SCSI3-PR.)
'/dev/sdc' and 'dev/sde' are set as "Yes" in PR, they uses storage device that supports SCSI3-PR, but Reserved-Key and Registered-Keys are "none" which means these LUN have never used as SCSI Lock resource in MCCS.
디바이스 For the "/dev/sdd" 의 경우 device, Reserved-Key와 Key and Registered-Keys가 소스 노드에서는 Key at the source node are set to C29043F13* , and C29043F13* 로 타겟 노드에서는 C29043F13, C29043F13로 등록되어 있고 이것은 스카시예약 에이전트를 이용해 리소스를 생성한 상태입니다.
두 노드 중 (*)표시가 포함 된 Reserved-Key와 Registered-Keys가 디스크 예약을 하고 있음을 나타냅니다. 또 Reserved-Key에 값을 가지고 있고 (*)표시가 되어있는 (예: C29043F13*) 노드만 디스크에 접근할 수 있습니다.and at the target node to C29043F13 and C29043F13. This means that a SCSI reservation agent was used to create the resource.
The Reserved-Key and Registered-Keys with (*) marked in the both node indicate that a disk is reserved. In addition, only the * marked node with the Reserved-Key value (ex: C29043F13*) can access the disk.