Coordinator 업그레이드
Coordinator / Deployer 는 부득이하게 수동으로 업그레이드 해야 한다.
주의사항
DDL 또는 DELETE 수행 중이 아니어야 한다.Coordinator Backup (Optional)
Coordinator 백업Backup the dbs/
and conf/
directories located in $MACH_COORDINATOR_HOME
dbs/
, conf/
디렉토리를 백업한다.
Coordinator
업그레이드Upgrade
Warning |
---|
Proceed with full package instead of lightweight package. |
Unzip and overwrite the package to $MACH_COORDINATOR_HOME
에 압축을 풀어 덮어쓴다.
Code Block |
---|
tar zxvf machbase-ent-new.official-LINUX-X86-64-release.tgz -C $MACHBASE_COORDINATOR_HOME |
Coordinator Startup
Code Block |
---|
machcoordinatoradmin --startup |
Deployer 업그레이드
Coordinator 와 동일하다.
주의 사항
- 업그레이드 중 Node 추가/구동/종료/삭제 등의 명령을 내릴 수 없다.
Deployer Upgrade
This has the same process as the Coordinator.
Precautions
- You can not issue commands such as adding / starting / terminating / deleting nodes during the upgrade.
Deployer Shutdown
Code Block |
---|
machdeployeradmin --shutdown |
Deployer Backup (Optional)
Deployer 백업Back up the dbs/
and conf/
directories located in $MACH_DEPLOYER_HOME
dbs/
, conf/
디렉토리를 백업한다.
Deployer
업그레이드Upgrade
Tip |
---|
Deployer 가 설치된 Host 에서 MWA 를 수행하거나 Collector 를 수행하지 않는다면, lightweight package 로 진행해도 무방하다. |
If you are running MWA or not running Collector on the Host the Deployer is installed, you can proceed with the lightweight package. |
Unzip and overwrite the package to $MACH_DEPLOYER_HOME
에 압축을 풀어 덮어쓴다.
Code Block |
---|
tar zxvf machbase-ent-new.official-LINUX-X86-64-release.tgz -C $MACH_DEPLOYER_HOME |
Deployer Startup
Code Block |
---|
machdeployeradmin --startup |
Package
등록Registration
To upgrade Broker / Warehouse 업그레이드를 위한 작업으로, register the Package 를 Coordinator 에 등록해서 업그레이드를 진행한다in Coordinator and proceed with the upgrade.
Tip |
---|
It is recommended to register with a lightweight package 로 등록하는 것이 좋다. |
먼저, Package 를 First, move the package to the Host where $MACH_COORDINATOR_HOME
이 위치한 host 에 옮긴다 is located.
그 다음, 아래 명령으로 패키지를 추가한다. Next, add the package using the following command.
Code Block |
---|
machcoordinatoradmin --add-package=new_package --file-name=./machbase-ent-new.official-LINUX-X86-64-release-lightweight.tgz |
옵션 Option | 설명 Description | |||
---|---|---|---|---|
--add-package | 추가할 패키지의 이름을 지정한다 Specifies the name of the package to add. | |||
--file-name | 추가할 패키지 파일의 경로를 지정한다Specifies the path to the package file to add.
|
Broker/Warehouse
업그레이드Upgrade
Coordinator 에서 다음 명령을 수행한다In the Coordinator, run the following command.
Node
종료Shutdown
Code Block |
---|
machcoordinatoradmin --shutdown-node=localhost:5656 |
Node
업그레이드Upgrade
Code Block |
---|
machcoordinatoradmin --upgrade-node=localhost:5656 --package-name=new_package |
옵션 Option | 설명 Description |
---|---|
--upgrade-node | 업그레이드 대상 Node 이름을 입력한다 Enters the name of the upgrade target Node. |
--package-name | 업그레이드할 Package 이름을 입력한다. |
Node 종료 없이 Node 업그레이드를 수행하면, 자동으로 Node 를 종료시키고 Node 업그레이드를 수행한다.
하지만, 안정성을 위해서 Node 종료를 명시적으로 수행하도록 한다.
Node 구동Enters the name of the Package to be upgraded. |
Info |
---|
If you upgrade the Node without shutting down the Node, it will automatically shut down the Node and perform the Node upgrade. However, for stability, you should explicitly shut down the Node before upgrading. |
Node Startup
Code Block |
---|
machcoordinatoradmin --startup-node=localhost:5656 |
Snapshot Failover
From Machbase 6.5 Cluster Edition, the Snapshot Failover
Machbase 6.5 Cluster Edition에 Snapshot Failover 기능이 추가되었다.
Snapshot Failover는 DBMS가 정상적인 상황일 때 Snapshot 을 기록해두고 특정 Warehouse의 장애 발생 시 정상인 Snapshot은 제외하고 문제가 발생한 부분에 대해서만 Failover를 수행함으로써 빠른 복구를 제공하는 기능이다.
Snapshot 기본 개념
Cluster Edition의 각 Group별로 Group 내 존재하는 Warehouse들 사이의 정상 데이터의 위치를 기록하는 개념이다.
Group 내의 Warehouse 에 생성된 Snapshot 이전의 데이터는 모두 정상 상태의 Data임을 보장하며 각 Group 별로 각각의 Snapshot을 기록한다.
Snapshot Failover 동작 방식
특정 Warehouse에 문제가 발생했을 경우 이 Warehouse는 Scrapped 상태로 데이터 복구가 필요한 상황이 된다.
Snapshot Recovery를 수행하게 되면 문제가 발생한 Warehouse에서의 정상 Snapshot을 기준으로 Snapshot 이후의 Data는 Clear하고 같은 Group 내 정상 상태의 Warehouse의 기준 Snapshot 이후 Data를 문제가 발생한 Warehouse로 Replication해서 복구를 완료한다.
Snapshot 자동 수행
Default로 Snapshot 자동 수행이 Enable 되어 있으며 Snapshot을 수행하는 주기는 60초로 설정 되어 있으며 Clustser에 Warehouse Group이 여러 개일 경우 Snapshot 주기마다 하나의 Group만 순서대로 Snapshot을 수행한다.
수행 주기를 0으로 설정하면 Snapshot 자동 수행이 Disable된다.
Snapshot 주기 설정은 명령어를 실행하면 즉시 반영된다function has been added.
Snapshot failover is a function that provides quick recovery by recording snapshots when the DBMS is in a normal condition and performing failover only for the part where the problem occurs, excluding the normal snapshot when a specific warehouse fails.
Snapshot basic concept
It is a concept to record the location of normal data between warehouses in the group for each group of Cluster Edition.
All data before the snapshot created in the warehouse in the group are data in a normal state, and each snapshot is recorded for each group.
How Snapshot Failover Works
When a problem occurs in a specific warehouse, the warehouse enters scrapped state and data recovery is required.
When performing Snapshot Recovery, data after the snapshot is cleared based on the normal snapshot in the warehouse where the problem occurred, and the data after the baseline snapshot of the warehouse in the normal state in the same group is replicated to the warehouse where the problem occurred to complete the recovery.
Automatic Snapshot Execution
By default, automatic snapshot execution is enabled, and the snapshot execution interval is set to 60 seconds. If there are multiple warehouse groups in a cluster, only one group performs snapshots sequentially every snapshot interval.
If the execution interval is set to 0, automatic snapshot execution is disabled.
Snapshot interval setting is reflected immediately when the command is executed.
Code Block |
---|
# Snapshot 주기Interval 설정Setting machcoordinatoradmin --snapshot-interval=[sec] # Check 현재the Snapshotcurrent 주기snapshot 확인interval machcoordinatoradmin --configuration |
Take Snapshot
수동 수행machcoordinatoradmin tool을 이용해 group_name을 지정하고 수동으로 Snapshot을 수행한다manually
Specify group_name using the machcoordinatoradmin tool and manually perform Snapshot.
group_name은 name is preset like group1, group2와 같이 미리 설정되어 있다.Cluster에 Group이 여러 개일 경우 전체 Snapshot을 찍기 위해서는 모든 각각의 Group에 Snapshot을 수행해줘야 한다group2.
If there are multiple groups in a cluster, snapshots must be performed for each group in order to take a full snapshot.
Code Block |
---|
# Manually group_name에take 대한a Snapshotsnapshot 수동for 수행group_name machcoordinatoradmin --exec-snapshot --group='group_name' |
Recover scrapped node
를based on Snapshot
기반으로 복구Scrapped node 가 발생한 경우 아래와 같이 복구한다If a scrapped node occurs, it is restored as follows.
Code Block |
---|
# Change 해당the group state 을to readonly # Prevents 로group 변경from #being 이후의changed 단계에서to group이normal normal로state 변경되는in 것을later 방지steps machcoordinatoradmin --set-group-state=readonly --group=[groupname] # Recover snapshotbased 기반으로on 복구Snapshot machcoordinatoradmin --snapshot-recover=[nodename] # replication을 통해 snapshot 이후의 최신 data를 복제 # replication이 끝나면 warehouse 의 상태는 normal로 자동 변경 Replicate the latest data after snapshot through replication # When replication is finished, the state of the warehouse is automatically changed to normal. machcoordinatoradmin --exec-sync=[nodename] # Change the group 상태를state normalto 로 변경readonly machcoordinatoradmin --set-group-state=normal --group=[groupname] |
Scrapped node의 Snapshot 기반 복구 과정
Snapshot으로 Scrapped node를 복구시 아래와 같은 과정이 수행된다Snapshot-based recovery process of scrapped nodes
When recovering a scrapped node with a snapshot, the following process is performed.
Code Block | ||
---|---|---|
| ||
/*최초 Initial cluster state 상태*/ +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | normal | normal | normal | ----------- | | warehouse | localhost:30420 | group1 | normal | normal | normal | ----------- | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ /*group1의 warehouse 0 of 0이group1 죽었을dies 때*/ +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly | scrapped | **unknown** | ----------- | | warehouse | localhost:30420 | group1 | readonly | normal | normal | ----------- | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ # Change 해당the group state 을to readonly 로 변경 machcoordinatoradmin --set-group-state=readonly --group=[groupname] kellen@kellen-ku:~$ machcoordinatoradmin --set-group-state=readonly --group=group1 ------------------------------------------------------------------------- Machbase Coordinator Administration Tool Release Version - 321a012d05.develop Copyright 2014, MACHBASE Corp. or its subsidiaries All Rights Reserved ------------------------------------------------------------------------- Group Name: group1 Flag : 1 +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly readonly | scrapped | **unknown** | ----------- | | warehouse | localhost:30420 | group1 | readonly readonly | normal | normal | ----------- | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ #죽은# Warehouse를Restart 다시the startupdead 수행한다warehouse +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly readonly | scrapped | scrapped | ----------- | | warehouse | localhost:30420 | group1 | readonly readonly | normal | normal | ----------- | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ # Recovery snapshotbased 기반으로on 복구snapshot machcoordinatoradmin --snapshot-recover=[nodename] kellen@kellen-ku:~$ machcoordinatoradmin --snapshot-recover=localhost:30410 ------------------------------------------------------------------------- Machbase Coordinator Administration Tool Release Version - 321a012d05.develop Copyright 2014, MACHBASE Corp. or its subsidiaries All Rights Reserved ------------------------------------------------------------------------- Node-Name: localhost:30410 +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly | scrapped | scrapped | ----------- | | warehouse | localhost:30420 | group1 | readonly readonly | normal | normal | ----------- | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ # Replicate replication을the 통해latest snapshotdata 이후의after 최신snapshot data를through 복제replication machcoordinatoradmin --exec-sync=[nodename] kellen@kellen-ku:~$ machcoordinatoradmin --exec-sync=localhost:30410 ------------------------------------------------------------------------- Machbase Coordinator Administration Tool Release Version - 321a012d05.develop Copyright 2014, MACHBASE Corp. or its subsidiaries All Rights Reserved ------------------------------------------------------------------------- Node-Name: localhost:30410 Source: +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly | scrapped | scrapped | stopped | | warehouse | localhost:30420 | group1 | readonly | normal | normal | stopped | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly readonly | sync-standby | sync-standby | running | | warehouse | localhost:30420 | group1 | readonly readonly | sync-active | sync-active | running | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | readonly readonly | normal | normal | stopped | | warehouse | localhost:30420 | group1 | readonly readonly | normal | normal | stopped | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ # Change the group 상태를state normalto 로 변경readonly machcoordinatoradmin --set-group-state=normal --group=[groupname] kellen@kellen-ku:~$ machcoordinatoradmin --set-group-state=normal --group=group1 ------------------------------------------------------------------------- Machbase Coordinator Administration Tool Release Version - 321a012d05.develop Copyright 2014, MACHBASE Corp. or its subsidiaries All Rights Reserved ------------------------------------------------------------------------- Group Name: group1 Flag : 0 +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ | coordinator | localhost:30110 | Coordinator | normal | primary | primary | ----------- | | coordinator | localhost:30120 | Coordinator | normal | normal | normal | ----------- | | deployer | localhost:30210 | Deployer | normal | normal | normal | ----------- | | broker | localhost:30310 | Broker | normal | leader | leader | ----------- | | broker | localhost:30320 | Broker | normal | normal | normal | ----------- | | warehouse | localhost:30410 | group1 | normal | normal | normal | stopped | | warehouse | localhost:30420 | group1 | normal | normal | normal | stopped | | warehouse | localhost:30510 | group2 | normal | normal | normal | ----------- | | warehouse | localhost:30520 | group2 | normal | normal | normal | ----------- | +-------------+-----------------+-----------------+-----------------+-------------------------------+-------------+ |
Snapshot
관련 Propertyrelated properties
Property | 설명Description | 설정 위치Applies to |
---|---|---|
GROUP_SNAPSHOT_TIMEOUT_SEC | Snapshot 실행 시의 timeout 시간을 결정Determines the timeout time when executing Snapshot Default : 60 (초sec) 최소 값 Minimum : 0 (무한 대기wait infinitely) 최대 값 Maximum : uint32_max (초sec) | Coordinator, Broker, Warehouse 각각의 Write in each node's machbase.conf 파일 내 작성file |