cubrid changemode

설명

CUBRID HA의 서버 상태를 확인하고 변경한다.

구문

cubrid changemode [option] <database-name>

옵션

옵션

기본값

설명

-m

none

서버 상태를 변경한다. 옵션 값으로 standby, maintenance, active 중 하나를 입력할 수 있다.

-f

 

서버의 상태를 강제로 변경할지 여부를 설정한다. 현재 서버가 to-be-active 상태일 때 active 상태로 강제 변경하려고 하는 경우에는 반드시 사용하며, 이를 설정하지 않으면 active 상태로 변경되지 않는다.
강제 변경 시 복제 불일치가 발생할 수 있으므로 사용하지 않는 것을 권장한다.

상태 변경 가능 표

다음은 현재 상태에 따라 변경할 수 있는 상태를 표시한 표이다.

 

변경할 상태

active

standby

maintenance

현재 상태

standby

X

O

O

to-be-standby

X

X

X

active

O

X

X

to-be-active

O*

X

X

maintenance

X

O

O

* 서버가 to-be-active 상태일 때 active 상태로 강제 변경하면 복제 불일치가 발생할 수 있으므로 관련 내용을 충분히 숙지한 사용자가 아니라면 사용하지 않는 것을 권장한다.

예시

다음 예는 localhost 노드의 testdb01 서버 상태를 maintenance 상태로 변경한다.

$ cubrid changemode -m maintenance testdb01@localhost

The server 'testdb01@localhost''s current HA running mode is maintenance.

$

다음 예는 localhost 노드의 testdb01 서버의 상태를 조회한다.

$ cubrid changemode tesetdb01@localhost

The server 'testdb01@localhost''s current HA running mode is active.

$