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 상황에서도 시스템간 공유된 데이터를 보다 안전하게 관리할 수 있도록 스카시예약 리소스와 공유디스크 리소스 간에 의존성을 설정합니다.
요구 사항
...
Requirement
External storage must support SCSI-3 PR.
Volume should be configured by LUN(Logical Unit Number) 단위로 스토리지가 구성되어야 합니다. 파티션 단위로 생성한 디스크는 지원하지 않습니다.
PrType 이 3인 옵션을 사용하게 되면, 하나의 LUN에 1GByte 정도의 디스크 크기가 스카시예약 에이전트 전용으로 할당되어 있어야 합니다.
구성 형태
MCCS는 공유 스토리지 환경을 구성 하기 위해, 공유디스크 에이전트와 스카시예약 에이전트를 제공합니다.
사용자는 환경에 따라 공유 디스크 에이전트만을 사용하거나, 스카시예약 에이전트와 함께 사용할 수 있습니다.
스카시예약 에이전트를 사용하는 목적은 OS의 Hang과 같은 외부 요소에 의해 발생되는 Split-Brain 상황에 대비하여, 데이타 디스크를 보다 안전하게 관리하기 위함입니다.
Info |
---|
공유 디스크 에이전트만 사용해야 하는 환경
|
공유디스크 에이전트와 스카시예약 에이전트의 차이
1. 공유디스크 에이전트는 로컬 노드에서 디스크 접근을 관리하고, SCSI Lock 에이전트는 스토리지에서 노드의 접근을 관리 합니다.
...
SW적인 디스크 관리 기능(공유디스크 에이전트)
...
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)
HW적인 디스크 관리 기능(스카시예약 에이전트) Disk management function in hardware perspective (SCSI Lock agent)
|
2. 공유디스크 에이전트, 스카시예약 에이전트 모두 데이터를 읽고 쓸 수 있습니다.
그러나 스카시예약 에이전트는 공유스토리지 리소스 보호가 목적이기 때문에 단독 사용하여 데이터를 읽고 쓰는 방법을 권장하지 않습니다.
그래서 스카시예약 에이전트는 공유스토리지 에이전트와 함께 사용하거나, 공유 스토리지와 별개의 LUN 을 사용하는 옵션(PrType)을 지원합니다.
Info |
---|
PrType (Persist Type) =1 (Write Exclusive) 은 LUN 에 대한 Write만을 제어 합니다. 이 옵션은 공유스토리지 에이전트에 의해 구성된 LUN과 함께 사용할 수 있습니다. =3 (Exclusive Access) 은 LUN에 대한 Access를 제어 합니다. 이 옵션은 공유스토리지 에이전트가 구성된 LUN이 아닌, 별도의 LUN을 지정하여 사용해야 합니다.
디스크는 작은 용량(약 1GB)으로도 가능하며 내용은 보호하지 않습니다. |
구성 방법
스카시예약 에이전트 리소스는 공유디스크 에이전트와 2가지 형태로 구성할 수 있으며, 스카시예약 에이전트 리소스의 속성 값에 따라 구성 방법이 나눠집니다.
...
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)
스카시예약 에이전트의 리소스에서 속성이 PrType 이 1 인 옵션을 사용하면, 하나의 LUN을 이용하여 공유디스크 리소스와 스카시예약 리소스를 구성합니다.
공유디스크 에이전트는 mount / umount를 이용하여 DATA-DISK를 관리하고, 스카시예약 에이전트는 SCSI3-PR 기능을 이용하여 LOCK-DISK를 관리합니다.
스카시예약 리소스와 공유디스크 리소스 간의 의존관계를 설정함으로써, Split-Brain 과 같은 상황에서 발생하는 DATA-DISK의 손상을 방지할 수 있습니다.
[그림] 공유디스크와 스카시예약 리소스를 동일한 LUN으로 구성 (PrType 이 1일 경우 구성)
2. 공유디스크와 스카시예약 리소스를 서로 다른 LUN으로 구성 (PrType=3)
공유디스크 에이전트는 단일 드라이브 문자 단위로 DATA-DISK를 관리하고, 스카시예약 에이전트 또한 별도의 독립된 단일 LUN을 LOCK-DISK 전용으로 관리합니다.
이 구성을 위해서는 공유디스크에 최소 2개 이상의 LUN 분할이 존재해야 합니다.
아래 그림과 같이 공유디스크 에이전트와 1:1로 의존시킬 LOCK-DISK 볼륨을 생성합니다. 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.
공유디스크 에이전트 다수와 스카시예약 에이전트 1개를 이용해, 의존관계를 구성하여 사용할 수도 있습니다
이 디스크는 스토리지에 접근할 수 있는 노드 확인에 이용하기 때문에 크기가 작아도 됩니다.
스카시예약 리소스와 공유디스크 리소스 간의 의존관계를 설정함으로써, Split-Brain과 같은 상황에서 발생하는 DATA-DISK의 손상을 방지할 수 있습니다.
[그림] 공유디스크와 스카시예약 리소스를 서로 다른 LUN으로 구성 (PrType 이 3일 경우 구성Figure] Shared disk and SCSI Lock resource is configured with different LUN( PrType=3)
Info |
---|
DATA-DISK 의미DISK
LOCK-DISK 의미
|
...
Configuration Sample
1. 공유디스크와 SCSI Lock 리소스를 동일한 LUN에 적용하여 구성 Shared disk and SCSI Lock resource is configured in same LUN (PrType = 1)
[그림] 공유디스크와 스카시예약 리소스를 동일한 LUN으로 구성
우선 공유디스크 에이전트 설정 절차에 따라 등록하고 정상적으로 동작이 되는지 확인한 후에 스카시예약 에이전트용 디스크를 설정합니다.
등록 절차
...
2. 공유디스크와 스카시예약 리소스를 서로 다른 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
2.Shared disk and SCSI Lock resource configured with different LUN (PrType = 3)
[그림] 공유디스크와 스카시예약 리소스를 서로 다른 LUN으로 구성
등록절차
우선 공유디스크 에이전트 설정 절차에 따라 등록하고 정상적으로 동작이 되는지 확인한 후에 스카시예약 에이전트용 디스크를 설정합니다.
...
추가
리소스를 추가하는 두 가지 방법이 있습니다.
하나는 그룹 이름에서 리소스를 추가하는 것이고, 또 하나는 리소스 타입에서 리소스를 추가하는 것입니다
그룹에서 추가 할 경우
...
리소스 타입에서 추가 할 경우
...
Figure] Shared disk and SCSI Lock resource configured with different LUN
Registration Procedures
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 device path which is not assigned for 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
- 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
- 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 - 정보를 모두 가져오면 스카시예약 리소스로 사용할 장치경로를 선택할 수 있습니다.
[그림] 스카시예약 리소스 장치경로 선택 화면
스카시예약 리소스를 등록할 장치경로가 없다면 "디스크없음" 메시지가 나옵니다Figure] Selecting driver letter View - When there is no disk for SCSI Lock resource, "Disk Not Found" message appears.
[그림] 스카시예약 리소스를 등록 할 수 없을 경우 화면Figure] Disk Not Found - 스카시예약 리소스에 사용할 장치경로를 선택하면 자동으로 권장이름을 제공해줍니다.
[그림] 스카시예약 리소스 드라이브 선택 화면
완료를 선택하면 스카시예약 리소스가 등록됩니다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 리소스의 상태 이동에 대해 설명합니다.
명령은 사용자에 의해 발생되는 것을 전제로 합니다.
...
상태 | Agent 가능 명령 | 설명 | 비고 |
---|---|---|---|
온라인 온라인 된 노드에서 디스크의 키가 배타적으로 예약된 상태입니다. | 오프라인 | 보관중인 예약키를 무시하고 새로 예약키를 만든 후 예약을 유지한 상태로 오프라인으로 전환합니다. | |
모니터링 | 디스크에 예약된 키를 비교하여 예약이 걸려있는지 확인합니다. | ||
오프라인 1. 디스크가 예약은 되어 있지만 리소스 상태는 오프라인 상태입니다. | 온라인 | 디스크 예약을 위해 키를 등록하고 상대 노드의 응답을 대기합니다. 한 번 온라인한 이후에는 상대 노드의 예약을 빼앗아 오는 형태(preempt)로 온라인이 진행됩니다. | |
모니터링 | 디스크에 예약된 키를 비교하여 예약이 걸려있는지 확인합니다. | ||
장애 온라인 중 예약을 빼앗긴 경우에 발생합니다. | 온라인 | 디스크 예약을 위해 키를 등록하고 상대 노드의 응답을 대기합니다. 한 번 온라인한 이후에는 상대 노드의 예약을 빼앗아 오는 형태(preempt)로 온라인이 진행됩니다. | |
오프라인 | 보관중인 예약키를 무시하고 새로 예약키를 만든 후 예약을 유지한 상태로 오프라인으로 전환합니다. |
...
Attribute
[그림] 스카시예약 속성 화면
스카시예약 리소스 기본 속성 에서 언급된 것 이외에 다음과 같은 상세 속성을 제공합니다.
설정은 리소스 속성 탭의 "리소스 고유속성" 에서 설정합니다.
각 속성 값의 의미는 다음과 같습니다.
...
속성 명
...
설명
...
데이터 타입
...
Figure] SCSI Lock 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 | Data Type | Default | Edit | Note |
DevicePath | Define the device path of disk to be used for reservation. When register device path, DUID of connected disk will automatically obtain. | STRING | X | ||
DiskDUID | 디스크의 DUID(Device Unique ID, Hex값으로 16바이트 크기)를 식별자로 사용합니다. This value is secure when DriveLetter atribute us specified. Try not to insert this value yourself. DUID information can be checked through scsicmd.cmd command and both nodes need to have the same value. | STRING | X | ||
Key | MAC 주소를 예약키로 사용합니다. 이 키는 에이전트가 자동으로 설정합니다. address is used as Reserved-Key. This key is automatically set by agent. | STRING | X | ||
PreemptWaitCount | 노드가 디스크를 예약할 때 상대노드에 예약 요청을 하고 응답을 대기합니다. Waiting time is (PreemptWaitCount * MonitorInterval) 초 입니다seconds. | STRING | 2회2 times | O | |
PrType | This attribute decides on how to give the permission of reserve disk access as Persist Type specified in SCSI3-PR 스펙에서 정의하는 Persist Type 으로 예약 디스크의 접근 권한을 어떻게 부여할 것인지 설정하는 속성입니다.6가지 타입이 있지만 MCCS는 1번 spec. There are 6 types bur MCCS uses 1 (Write Exclusive) 혹은 3번or 3 (Exclusive Access) 을 사용합니다. 1번1 (Write Exclusive) 은 공유디스크와 동일한 LUN을 사용할 때 설정합니다. 3 (Exclusive Access) 은 오직 is used when only Lock_Disk 용으로 사용할때만 설정합니다. In this case, SCSI Lock agent LUN is required. | STRING | Prytpe = 1 | O |
...
scsicmdCommand
...
Syntax
Code Block |
---|
scsicmd [option] [devicePath] |
옵션
...
Option
This is the utility to use SCSI 3 PR command more easily. Following is the provided options
옵션 | 설명 |
-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 | 어떤 노드로 예약이 되어 있어도, 지정된 디스크를 강제로 잠그고 예약을 합니다. |
-h | scsicmd 의 도움말을 보여줍니다. |
no option | 옵션이 없는 경우 시스템의 디스크 예약 관련 상태정보를 보여줍니다. |
샘플출력
...
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. |
Print Sample
Panel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The output of 'scsicmd' command from source node (C29043F13 is MAC Address of NIC from source node.)
타겟 노드의 The output of 'scsicmd' 명령어 출력결과 (C29043F13는 소스 노드의 MAC Address 입니다command from target node (C29043F13 is MAC Address of NIC from source node.)
|
디바이스 "
Since '/dev/sda"은 PR이 "No" 로 설정되었기 때문에 SCSI3-PR을 지원하는 디스크가 아닌 것을 확인할 수 있습니다. (보통 장치경로가 "/dev/sda"로 시작하는 것은 시스템 디스크이고, SCSI를 지원하지 않습니다.)
또한 디바이스 "/dev/sdb"은 PR이 "No"로 설정되어 있으므로 SCSI3-PR을 지원하는 디스크가 아닌 것을 확인할 수 있습니다.(Internal Disk는 SCSI3-PR을 지원하지 않습니다.)
디바이스 "/dev/sdc"과 디바이스 "/dev/sde"은 SCSI3-PR이 "Yes"로 설정되어 있으므로 SCSI3-PR을 지원하는 Storage 장치를 이용하고 있음을 나타냅니다. 또한 Reserved-Key 와 Registered-Keys가 "none"인 것은 아직 등록되지 않는 상태를 의미 합니다' 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.
디바이스 "/dev/sdd"의 경우 Reserved-Key와 Registered-Keys가 소스 노드에서는 C29043F13*, C29043F13*로 타겟 노드에서는 C29043F13, C29043F13로 등록되어 있고 이것은 스카시예약 에이전트를 이용해 리소스를 생성한 상태입니다.
두 노드 중 (*)표시가 포함 된 Reserved-Key와 Registered-Keys가 디스크 예약을 하고 있음을 나타냅니다. 또 Reserved-Key에 값을 가지고 있고 (*)표시가 되어있는 (예: C29043F13*) 노드만 디스크에 접근할 수 있습니다.
...