17
7.1 MC/ServiceGuard 모모모모모모 Cluster 모 “ down” 모모 모모모 모 ( 모모 모모모모 “ cmviewcl-c” 모 모모 ) 모 모모모모 모모 package 모 모모모 모모모 모모모 모모모 모모모 package 모 모모모모모 모모모모 모모 모모모모 모모모모 package 모 모모 모모모 모모모모 모모모 ( 모 , package switching mo de 모 enable 모 모모 ) 모모 package 모 shutdown 모 . 모모모모모 모모 RIP 모 모모모모 . 모모 Volume Group 모 모모 모모 모모 모모모 package 모 모모모모 RIP 모 Volume Group 모 모모모 모 모모 Cluster 모 모모모모 모모 모모 ( 모모 2 모모 모모 모모모모 Running) Cluster 모 모모모모 모모 모모 ( 모모 1 모모 Runnin g) Cluster 모 모모모 ( 모모 1 모모모모 Runnin g) Cluster 모 모모모 ( 모모 모모모 Running) Cluster 모 모모모 Package 모모모 Cluster 모모모 (“cmviewcl-v” 모 모 모) 모모모 모모모 모모모모모 clu ster 모모모 (“cmviewcl-v” 모 모 모) 모모모 모모모 cluster 모 모모모 모모모 모모모 모모모 clust er 모 모모모 cluster 모 모모모 모모 package 모 모모모 cmruncl-v cmruncl -n mes10 1 모모 cmruncl-n mes102 cmrunnode -v -n mes101 모모 cmrunnode -v -n mes102 cmhaltnode -v -n mes101 모모 cmhaltnode -v -n mes102 cmhaltcl -v -f cmhaltpkg -v pkg 1 모모 cmhaltpkg -v pkg 2 MC/ServiceGuard Cluster 모 모모 MC/ServiceGuard Cluster 모 모모 모모모 모모모 cluster 모 모모 Cluster 모모 모모 1 모모 cluster 모모 모모모모 ( 모모 모모 모 ) MC/ServiceGuard C luster 모모 모모모 package 모 모모 모모모모모 모모모 모모모모 7.1.1 MC/ServiceGuard 운운운운

7.1 MC/ServiceGuard

  • Upload
    tao

  • View
    262

  • Download
    0

Embed Size (px)

DESCRIPTION

7.1 MC/ServiceGuard. 7.1.1 MC/ServiceGuard 운영방법. 시스템상태 목 적 명령어 수행결과 기 타. cmruncl-v cmruncl -n mes101 또는 cmruncl-n mes102 cmrunnode -v -n mes101 또는 cmrunnode -v -n mes102 cmhaltnode -v -n - PowerPoint PPT Presentation

Citation preview

Page 1: 7.1   MC/ServiceGuard

7.1 MC/ServiceGuard

모든서버에서 Cluster 가 “ down”

되어 있어야 함(모든 서버에서 “ cmviewcl-c” 로

확인 )

한 서버에서 모든 package 가 기동됨

새로이 추가된 서버에 지정된 package 가 가동중이면 변화없음

해당 서버에서 수행되던 package는 다른 서버로 이동되어 수행됨(단 , package switching mode 가 enable 인 경우 )

모든 package 도 shutdown 됨 . 사용중이던 모든 RIP 를 사용불가 . 공유 Volume Group을 모두 사용 불가

정지된 package 가 사용하던 RIP 및 Volume Group 을 사용할 수 없음

Cluster 가 구성되어 있지 않음 ( 서버 2 대가 모두

정상으로 Running)

Cluster 가 구성되어 있지 않음 ( 서버 1 대만 Running)

Cluster 가 가동중(서버 1 대만으로 Running)

Cluster 가 가동중

(모든 서버가 Running)

Cluster 가 가동중

Package 가동중

Cluster 구성됨(“cmviewcl-v” 로 확인 )

명령을 수행한 서버만으로 cluster 구성됨(“cmviewcl-v” 로 확인 )

나머지 서버도 cluster에 포함됨

명령을 수행한 서버가 cluster 에 제외됨

cluster 가 정지됨

해당 package 가 정지됨

cmruncl-v

cmruncl -n mes101 또는cmruncl-n mes102

cmrunnode -v -n mes101또는cmrunnode -v -n mes102

cmhaltnode -v -n mes101또는cmhaltnode -v -n mes102

cmhaltcl -v -f

cmhaltpkg -v pkg1또는cmhaltpkg -v pkg2

MC/ServiceGuardCluster 를 기동

MC/ServiceGuardCluster 를 기동

나머지 서버를 cluster 에 추가

Cluster 내의 서버 1 대를 cluster 에서 제외시킴 (유지 보수 등 )

MC/ServiceGuard Cluster정지

가동중 package 를 정지

시스템상태 목 적 명령어 수행결과 기 타

7.1.1 MC/ServiceGuard 운영방법

Page 2: 7.1   MC/ServiceGuard

지정된 서버에서 Package가 기동되지만 Switching 기능은 변화가 없으므로 , Disable 상태인 경우는 “ cmmodpkg” 명령으로 Enable 시켜야 장애시 switching 가능

명령어에서 서버 지정 “ -n mes101” 을 생략하면 cluster 내의 모든 서버가 switching enable 상태로 됨

Package 가 정지중

Package Switching 기능이 disable

Package pkg1 이 서버 mes101 에서 기동됨

서버 mes101 으로 pkg1 이 switching 가능

cmrunpkg-n mes101pkg1혹은cmrunpkg -n mes102 pkg2

cmmodpkg -e -n mes101 pkg1

Package를 기동

Package Switching을 enable

시스템상태 목 적 명령어 수행결과 기 타

Page 3: 7.1   MC/ServiceGuard

7.1.2 Application Maintenance 요령

MC/ServiceGuard 가 설치되고 Application 이 Package 로 정의되면 , 그 수행이 2대의 서버에 관련되므로 Version Up 등의 Application software Maintenance 가 불편한 경우가 있다 . 더욱이 , Package 에서 사용하고 있는 Relocatable IP 와 Volume Group 은 Cluster 를 정지시키면 사용할 수 없으므로 MC/ServiceGuard 에 의하지 않고 Application을 단독적으로 수행할 수 없게 된다 .

이러한 경우에 다음과 같은 절차에 의하여 MC/ServiceGuard 를 정지시키지 않고 Application 을 단독으로 운영할 수 있다 . 아래의 예는 Package “pkg1” 에 포함된 mission2 에서 test 하기 위한 방법이다 .

mes101 과 mes102 에서 모두 cluster 가 Running 인지를 확인

Package “pkg1 or pkg2” 의 수행을 정지(이미 정지된 경우는 생략하여도 됨 )

서버 mes102 에 자원을 enable 시킴 .- Volume Group- File System- Relocatable IP

해당 Application 의 Maintenance 작업을 수행

Maintenance 작업이 종료되면 반드시 shutdown 하여야 함

cmviewcl

cmhaltpkg -v pkg1 orcmhaltpkg -v pkg2

/etc/cmcluster/pkg1.cntl on

mes101 ormes102

mes101 ormes102

mes102

mes102

1

2

3

4

순서 수 행 노 드 명 령 어 수 행 내 용

Page 4: 7.1   MC/ServiceGuard

서버 mes102 에서 시험을 위하여 사용하였던 자원을 disable 시킴 .- Volume Group- File System- Relocatable IP

필요시 서버 mes101 에서 3,4,5 과정을 수행 .

Package “pkg2” 를 서버 mes101 에서 기동시킴 .

Package “pkg1” 의 switching 기능을 enable 시킴 .

/etc/cmcluster/pkg1.cntl off

cmrunpkg -n mes101 pkg1

cmmodpkg -e pkg1

mes102

mes101

mes101 or mes102

mes101 or mes102

5

6

7

8

순서 수 행 노 드 명 령 어 수 행 내 용

주의 : “/etc/cmcluster/pkg1.cntl 을 직접 수행하는 것은 MC/ServiceGuard 의 지원기능이 아니므로 MC/Servi

ceGuard 의 명령을 수행하고자 하는 경우는 반드시 “ off” 하여야 함

Page 5: 7.1   MC/ServiceGuard

7.1.3 Network IP Address 변경시의 수정방법

#cmhaltcl -f

클러스터에 포함된 모든 서버에서 작업

#shutdown -r 0

← Lan Card 의 stationary IP 정보

← 각 Package 가 사용할 Data Lan 의 Subnet 정보

← 각 Package 의 Subnet 과 Relocatable IP 정보

수정 작업을 하지 않은 모든 서버로Copy

임의의 서버에서 실행

/etc/rc.config.d/netconf/etc/hosts

/etc/cmcluster/cluster_file.asc

/etc/cmcluser/pkg1.conf /etc/cmcluster/pkg2.conf

/etc/cmcluster/pkg1.cntl, /etc/cmcluster/pkg2.cntl

#rcp-r /etc/cmcluster/* mes102:/etc/cmcluster

#vgchange-c n vg03#vgchange-a y vg03#cd /etc/cmcluster#./Run

MC/ServiceGuard 의 정지

System (HP-UX) 의 Net-work 관련 File 의 수정

System 의 Reboot

MC/ServiceGuard 관련 File 의 수정

MC/ServiceGuard 관련 File 의 Copy

MC/ServiceGuard Configuration File 의 재생성

작 업 내 용 대상 File 명칭 비 고

Page 6: 7.1   MC/ServiceGuard

기동되지 않은 Package 가 있으므로 해당 Package 가 사용하는 VG 를 cluster mode 로 설정하고 , package switching mode 를 enable 시킨다 .- vgchange -c y vg02- cmmodpkg -e pkg1

#cmruncl -v

#cmviewcl -v

MC/ServiceGuard 의 기동

MC/ServiceGuard 상태 확인

작 업 내 용 대상 File 명칭 비 고

Package 에서 사용하는 데이터 LAN 의 Subnet 이 변경되거나 , 각 LAN Card 의 Stationary IP 변경시에는

반드시 Cluster 관련 Configuration 정보를 재생성하여야 함 (cmapplyconf 명령어 사용 ) Package 의 Relocatable IP 만을 변경하고자 할 때는 Cluster 의 정지 (cmhaltcl 명령 ) 시키고 *.cntl

파일 (Package Control Script) 만을 수정 하면 됨 . (cmapplyconf 가 필요없음 )

Page 7: 7.1   MC/ServiceGuard

Clustrer Implementation Procedure

No Step (Command) Description Check Point

1 cmquerycl-v-C cluster_file-n mes101 -n mes102

Cluster를 구성하는 file을 생성 Cluster_file (LAN adapter,

address, disk information etc)

양서버가 모두 Berkeleyservice가 가능해야 한다 .

/.rhosts 에 등록

2 cmmakepkg -p pkg1.confcmmakepkg -s pkg1.cntlcmmakepkg -p pks2.confcmmakepkg -s pkg2.cntl

Package에 관련된 내용을 정의하고 수행한다 .

RIP address, subnet address volume group & file system info.

add and delete, service enable& disable, 사용자 정의 programdeactivate & activate, user정의 application수행

Subnet mask정의 확인 heartbeat IP와 user IP의 segment가 물리적으로 분리 되었을 경우 반드시 틀려야

한다 .

Check

error:xx IP is alreadyexist or xx IP is notvalid on this segment

Page 8: 7.1   MC/ServiceGuard

No Step (Command) Description Check Point

3 Application shell script작성

Oracle DBMS의 startup, Shutdown and monitoring수행 monitoring program은 MC/SG에의해 monitoring 된다 .

Oracle version7.3.2 미만

*sqldba lmode=y→DB start or shutdown

7.3.2이상 *svrmgrl

→DB start or shutdown shell script를 반드시 수정

4 cmcheckconf -v -C $DIR/cluster_file -P $DIR/pkg1.conf -P $DIR/pkg2.conf

작성된 Package file에 대한 검증 error가 발생하지 않아야 다음단계 수행

반드시 모든 file들은 양쪽 서버에 존재해야 한다 . rcp 로 전송

Page 9: 7.1   MC/ServiceGuard

No Step (Command) Description Check Point

5 cmapplyconf -v -C $DIR/

cluster_file -P $DIR/pkg1/

pkg1.config -P $DIR/pkg2/

pkg2.conf

Error 가 발생하지 않았을 경우수행Configuration 정보를 통해cluster binary file에 대한

lock disk 생성 및 초기화 작업 수행

6

cmviewcl -[v] cluster status monitoringwhile truedoclearcmviewcl -vsleep 5done

cmruncl -v cluster enable

cmhaltcl -v -f cluster shutdown

Page 10: 7.1   MC/ServiceGuard

SERVICE GUARD QUICK REFERENCE (commands in /usr/sbin)

Abbreviations : CN = cluster_name NN = node_name PN = package_name

Explainations : ... = multiple occurrences = OR [descriptor] = optional

·query and validate cluster or node configuration information

cmquerycl [{ - c CN...│-n NN... }] [ -l{net│lvm}][-v][-c cluster_ascii_file][-c] name of the cluster for inquiry

[-n]name of the node(hostname) for inquiry

[-l] display ONLY net net OR lvm information[-v] Verbose output

[-c]Create cluster configuration file named UNIQUE_NAME Edit and use 'cmcheckconf' to validate.cmquerycl -V -C /etc/cmcluster/pat -n frick -n frack (makes ASCII file)cmquercl -v -n frick (gather all config info about frick)

Eg

·create SG package template filecmmakepkg { -s│-p } [output_file_name] [-p]

[-s]

Create a sample pkg CONFIG.file.(do 1 per package)Create a sample pkg CONTROL script to run and halt the pkg.(do 1 per pkg)

Page 11: 7.1   MC/ServiceGuard

· validate SG cluster configuration or package filescmcheckconf[-v] -C cluster_ascii_file [[-p pkg_reference_file]│ [-P pkg_ascii_file ....]]

[-v] Verbose

-C cluster_ascii_file : Name of cluster ASCII file to use.[-P pkg_reference_file] file containing a list of pkg config. file(s) to useOR[-P pkg_ascii_file...] Name of the package configuration file(s) to use.

· create and distribute binary config file to nodes in clustercmapplyconf [-f][-v]-C cluster_ascii_file.. [[-p pkg_reference_file]│ [-P pkg_ascii_file...]]

· Start SG daemons and form a new cluster

cmruncl [-f][-v][-n NN....]

[-f] Force cluster startup without warning message

[-f]

[-v]

Force replacement / creation of binary config file on all nodes

Verbose-C cluster_ascii_file : Name of cluster ASCII file to use.[-P pkg_reference_file] file containing a list of pkg config. file(s) to useOR[-p pkg_ascii_file...] Name of the package configuration file(s) to use.

[-v][-n]

Verbose outputspecific name(s) of node(s) to

Page 12: 7.1   MC/ServiceGuard

· view information about the current SG cluster

cmviewcl [-v][-n NN]...[-p PN]....[-l {package│ cluster│ node}]

[-v] Verbose output

[-n][-p]

View information only about the specific node_name(s).package_name... View information only about the specific node_name(s).

· halt SG cluster daemonscmhaltcl [-f][-v]

[-f] Force the cluster to shutdown even if packages are currently running.[-v] Verbose output

· Start SG daemon on node(s) and join a cluster

cmruncl [-f][-v][-n NN....]

[-v] Verbose output

[l] pkg│ clus│ node Display only package, cluster or node specific information.

· halt SG daemon on node(s) and leave the clustercmhaltnode [-f][-v][NN....]

· run a SG packagecmrunpkg[-n NN][-v] PN...

[-n] Act on a specific node.

[-f]

[-v]

[-v] Verbose output

Force the node th halt even if there are package running on it.

Verbose output

Page 13: 7.1   MC/ServiceGuard

cmruncl [-f][-v][-n NN....][-v] Verbose output

cmigrate [-V][-C cluster_ascii_file][-s switchinfo_file]

[-v] Verbose [-C cluster_ascii_file] Name of cluster ASCII file to create.

· migrate a Switchinfo file to a SG cluster configuration file

· halt a SG package

cmhaltpkg[-n NN...][-v] PN...

[-n] Act on a specific node.

[-v] Verbose output

cmmodpkg[-v][-n NN]... {-e│ -d} PN...

[-v] Verbose output[-n] Modify attributes on specific node(s) - else globally mod.

· enable or disable swiching attributes for a SG package

-e enable-d disablePN -package(s) whose switching attributes are changed

-s switchinfo_file : name of /etc/switch/Switchinfo file to be converted

· add OR remove IP addresses on a LAN card via pkg control scripscmhaltnode [-f][-v][NN....]

[-f]

[-v]

Force the node th halt even if there are package running on it.

Verbose output

Page 14: 7.1   MC/ServiceGuard

cmruncl [-f][-v][-n NN....][-v] Verbose output

cmigrate [-V][-C cluster_ascii_file][-s switchinfo_file]

[-v] Verbose [-C cluster_ascii_file] Name of cluster ASCII file to create.

· migrate a Switchinfo file to a SG cluster configuration file

· halt a SG package

cmhaltpkg[-n NN...][-v] PN...

[-n] Act on a specific node.

[-v] Verbose output

cmmodpkg[-v][-n NN]... {-e│ -d} PN...

[-v] Verbose output[-n] Modify attributes on specific node(s) - else globally mod.

· enable or disable swiching attributes for a SG package

-e enable-d disablePN -package(s) whose switching attributes are changed

-s switchinfo_file : name of /etc/switch/Switchinfo file to be converted

· add OR remove IP addresses on a LAN card via pkg control scrips

· run a SG packagecmrunpkg[-n NN][-v] PN...

[-n] Act on a specific node.

[-v] Verbose output

Page 15: 7.1   MC/ServiceGuard

cmmodnet{-a|-r} [-i IP_Address] IP_subnet

a Add the IP address to the subnet_name

r Remove the IP address from the subnet_name

i IP_Address Use the IP address given for the operations

OR

cmrunserv service_name service_command_string

· Start services form the package run/halt script

cmhaltsev service_name

· stop services from the package run/halt script

UNSUPPORTED COMMANDS

· build a cluster config. ASCII file form the binary fileusr/contrib/bin/cmgetconfig

-c display configuration of the current running cluster in clusterconf.ascii format

-f display configuration from a binary cluster config file

-F user specified binary cluster configuration file

(default is /etc/cmcluster/cmclconfig)

-o write configuration information to the specified file

-v verbose

-h print this help message

Page 16: 7.1   MC/ServiceGuard

· allows the safety timer process to be disabled, enabledusr/contrib/bin/cmsetsafety[on|off]

on -turns safety timer on for the local node (default)

off -turns safety timer off for the local node

· logs SG flowusr/contrib/bin/cmsetlog

age:cmsetlot[-M][-C][]

cmsetlog -r

cmsetlog -f

Page 17: 7.1   MC/ServiceGuard

-M:selects a module:CLM - cluster managementPKG - package managementNET - network interfaceSRV - service monitoringLOC - local communicationsREM - remote communicationsSDB - status databaseSYN - synchronizationCMD - command serverDLM - distributed lock managerLVM - share LVMUTL - general support

-C:selects a category:ERR - Internal errormentXER - External errorDTH - Fatal Internal errorINT - ActionPER - Frequent ActionTRC - T*R*A*C*E

Without -M, ALL modules are effectedWithout -C, all categories except PER are effectedWithout level, logging is set to minimal levels

-r: resets all logging to minimal levels-f: daemon starts logging to specified file-s: daemon logs only to syslog

Note that cmsetlog operates only on the local daemon.It must be run on each node you wish to change logging on.