12c MGMTDB(GIMR) 소개및구성가이드 2018. 8 김종인
Agenda 1. MGMTDB(GIMR) 이란? 2. GIMR Toploogy 3. GIMR 환경 4. GIMR tools
12c GIMR (Grid Infrastructure Management Repository)) MGMT 란무엇인가? - Management Repository 는 Oracle Clusterware 가 12c 에서관리하는단일인스턴스데이터베이스 - 단일인스턴스데이터베이스므로클러스터의한노드에서실행되고관리됨 - GI 에서관리하므로호스팅노드가다운된경우데이터베이스가자동으로장애조치됨 MGMT 의목적 - 관리데이터베이스는클러스터상태모니터 ( 일명 CHM / OS, ora.crf) 및기타데이터를 12c 에저장하는중앙저장소임. MGMT 의위치 - 12.1 에서기본적으로 MGMT 는 OCR/VOTE 파일과동일한공유저장소를사용함. - 12.2 에서는새로설치하면별도의디스크그룹이허용됨 ( 분리설치가능 ) MGMT 의미구성 - 설치 / 업그레이드중에 MGMT 를구성하도록선택하지않으면해당데이터베이스에종속된모든기능 ( 클러스터상태모니터 (CHM/OS) 등이비활성화됨 ) - 단이것은 12.1.0.2 이후로는반드시 GIMR 를가지고있어야하며 Exadata 를제외하고는꺼놓을수없음. 3
12c GIMR (Grid Infrastructure Management Repository)) MGMT 와관련된리소스 - crsctl stat res t 의자원은관리데이터베이스용도 ora.mgmtdb 1 ONLINE ONLINE test1 Open,STABLE ora.mgmtlsnr 1 ONLINE ONLINE test1 169.254.152.185 10.1 0.10.1,STABLE - os 레벨에서데이터베이스 -MGMTDB 및리스너 MGMTLSNR 은관리데이터베이스용 ps -ef grep pmon_-mgmtdb oracle 4587 1 0 10:58? 00:00:00 mdb_pmon_-mgmtdb ps -ef grep MGMTLSNR oracle 4343 1 0 10:57? 00:00:00 /u01/app/12.2.0.1/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit MGMT 의디스크공간 Cluster Configuration 2node,4MB AU, 1 asm disk Redundancy level OCR Voting MGMT diskgroup 비고 External ( 이중화없음 ) 500 M 300 M 39 G 최소사항 Normal ( 이중화 ) 2G * 3EA 100 G * 1EA 권장사항 (MGMT 는이중화없음 ) 4
12c GIMR (Grid Infrastructure Management Repository)) MGMT 의디스크공간 Cluster Configuration 2node,4MB AU, 1 asm disk Redundancy level OCR Voting MGMT diskgroup 비고 External ( 이중화없음 ) 500 M 300 M 39 G 최소사항 Normal ( 이중화 ) 2G * 3EA 100 G * 1EA 권장사항 (MGMT 는이중화없음 ) 7.1.2 Oracle Clusterware Storage Space Requirements 5
12c GIMR (Grid Infrastructure Management Repository) MGMT 의디스크공간예시 https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwlin/oracle-clusterware-storage-space-requirements.html#guid-97fd5d40-a65b-4575-ad12-06c491af3f41 6
12c GIMR (Grid Infrastructure Management Repository)) MGMT 의디스크공간 ( 이중화여부 ) MGMT ( 일반적으로 External) OCR / Voting ( 이중화권장 ) http://www.oracle.com/technetwork/database/options/clustering/ahf/learnmore/oracle-gimr-3623191.pdf 7
12c GIMR (Grid Infrastructure Management Repository)) MGMR 디스크그룹구성가이드 - 설치및업그레이드시가능한구성 (1 안및 2 안선택 ) 1 안 ) 하나의디스크그룹으로구성 VOTE Diskgroup = OCR + VOTE + GIMR 2 안 ) 두개의디스크그룹으로분리구성 VOTE Diskgroup = OCR + VOTE MGMT Diskgroup = GIMR OCR 백업화일을별도의다른디스크그룹에두고저장하는것을권고하므로디스크그룹의분리를권장함. 또한스토리지의성능, 가용성, 사이징, 관리등의이유로권장하고있음. Oracle Grid Infrastructure Installation and Upgrade Guide, 12c Release 2 (12.2) for IBM AIX on POWER Systems (64-Bit) 의해당 Cheapter 내용발췌 6.4 Guidelines for Using Oracle ASM Disk Groups for Storage Plan how you want to configure Oracle ASM disk groups for deployment. During Oracle Grid Infrastructure installation, you can create one or two Oracle ASM disk groups. After the Oracle Grid Infrastructure installation, you can create additional disk groups using Oracle Automatic Storage Management Configuration Assistant (ASMCA), SQL*Plus, or Automatic Storage Management Command-Line Utility (ASMCMD). Choose to create a second disk group during Oracle Grid Infrastructure installation. The first disk group stores the Oracle Cluster Registry (OCR), voting files, and the Oracle ASM password file. The second disk group stores the Grid Infrastructure Management Repository (GIMR) data files and Oracle Cluster Registry (OCR) backup files. Oracle strongly recommends that you store the OCR backup files in a different disk group from the disk group where you store OCR files. In addition, having a second disk group for GIMR is advisable for performance, availability, sizing, and manageability of storage If the cluster being upgraded has a single disk group that stores the OCR, OCR backup, Oracle ASM password, Oracle ASM password file backup, and the Grid Infrastructure Management Repository (GIMR), then Oracle recommends that you create a separate disk group or use another existing disk group and store the OCR backup, the GIMR and Oracle ASM password file backup in that disk group. 8
12c GIMR (Grid Infrastructure Management Repository) OCR / VOTE 디스크구성가이드가이드 - 12.2 설치및업그레이드시 ASM 만사용가능 (Desupport of Direct File System Placement) - 업그레이드시는 OCR/VOTE 용도의디스크그룹내에 MGMT 도같이생성이되므로같이사용하거나추후분리가능 ( 충분한공간확보필요, 권장 100G 이상 ) 분리할경우작업예 ) - crsctl replace votedisk +VOTE -./ocrcheck -./ocrconfig -add +VOTE -./ocrconfig -delete [ocr_file_ path_previously_on_nfs] Oracle Grid Infrastructure Installation and Upgrade Guide, 12c Release 2 (12.2) for IBM AIX on POWER Systems (64-Bit) 의해당 Cheapter 내용발췌 Changes in Oracle Grid Infrastructure 12c Release 2 (12.2) Desupported Features Desupport of Direct File System Placement for Oracle Cluster Registry (OCR) and Voting Files Starting with Oracle Grid Infrastructure 12c Release 2 (12.2), the placement of Oracle Clusterware files: the Oracle Cluster Registry (OCR), and the Voting Files, directly on a shared file system is desupported in favor of having Oracle Clusterware files managed by Oracle Automatic Storage Management (Oracle ASM). You cannot place Oracle Clusterware files directly on a shared file system. If you need to use a supported shared file system, either a Network File System, or a shared cluster file system instead of native disk devices, then you must create Oracle ASM disks on supported network file systems that you plan to use for hosting Oracle Clusterware files before installing Oracle Grid Infrastructure. You can then use the Oracle ASM disks in an Oracle ASM disk group to manage Oracle Clusterware files. If your Oracle Database files are stored on a shared file system, then you can continue to use shared file system storage for database files, instead of moving them to Oracle ASM storage. 9
12c GIMR (Grid Infrastructure Management Repository)) ASM Disk 구성 Guide - ASM disk group 구성시 logical volme 의구성은권장하지않음 ( 복잡성증가의이유 ) - single LUN (Logical Unit Number) 단위로구성권장 (without striping or mirroring) - 단, 3 rd Party 제품등 (CFS ) 을사용할경우에는운영환경을고려하여작업할수있음. Oracle Grid Infrastructure Installation and Upgrade Guide, 12c Release 2 (12.2) for IBM AIX on POWER Systems (64-Bit) 의해당 Cheapter 내용발췌 7.1.1 Identifying Storage Requirements for Oracle Automatic Storage Management If you are sure that a suitable disk group does not exist on the system, then install or identify appropriate disk devices to add to a new disk group. Use the following guidelines when identifying appropriate disk devices: The disk devices must be owned by the user performing Oracle Grid Infrastructure installation. All the devices in an Oracle ASM disk group must be the same size and have the same performance characteristics. Do not specify multiple partitions on a single physical disk as a disk group device. Oracle ASM expects each disk group device to be on a separate physical disk. Although you can specify a logical volume as a device in an Oracle ASM disk group, Oracle does not recommend their use because it adds a layer of complexity that is unnecessary with Oracle ASM. Oracle recommends that if you choose to use a logical volume manager, then use the logical volume manager to represent a single logical unit number (LUN) without striping or mirroring, so that you can minimize the effect on storage performance of the additional storage layer. 10
GIMR Topology (12.2.0.1) Listener and Networking OS Data OS Data OS Data osysmond osysmond osysmond ologgerd oclumon oclumon> GIMR EMCC 11
GIMR 환경 GIMR 에저장되는정보 저장되는정보 Cluster Health Monitor 가수집하는실시간성능데이터 Cluster Health Monitor / Advisor Cluster Health Advisor 가수집하는장애진단및통계데이터 Cluster Health Monitor / Advisor 클러스터웨어가수집하는모든자원에대한클러스터전체의이벤트 Cluster Resource Activity Log 서비스품질관리 (QoS) CPU 아키텍처데이터 Rapid Homes Provisioning QoS 관리 : 워크로드모니터링및자원재배치 바이너리패치관리및배포 12
GIMR 환경 Oracle Database Parameter 와설정값 13
GIMR Tools SRVCTL : GIMR Lifecycle Control srvctl start stop mgmtdb srvctl status mgmtdb srvctl Database is enabled Instance -MGMTDB is running on node mysvr1 config mgmtdb Database unique name: _mgmtdb Database name: Oracle home: <CRS home> Oracle user: grid Spfile: +DATA/_MGMTDB/PARAMETERFILE/spfile.20150930124309 Password file: Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Type: Management PDB name: mycluster PDB service: mycluster Cluster name: mycluster Database instance: -MGMTDB srvctl modify mgmtdb: Do Not Use! srvctl start stop mgmtlsnr srvctl status mgmtlsnr srvctl Listener MGMTLSNR is enabled Listener MGMTLSNR is running on node(s): mysvr1 config mgmtlsnr Name: MGMTLSNR Type: Management Listener Owner: grid Home: <CRS home> End points: TCP:1525 Management listener is enabled. Management listener is individually enabled on nodes: Management listener is individually disabled on nodes: srvctl modify mgmtlsnr -endpoints TCP:1531 12.2.0.1+ PDB name: GIMR_DSCREP_## PDB service: GIMR_DSCREP_## 14
GIMR Tools mdbutil.pl 오라클에서제공하는비공식툴로 MGMTDB 를다른디스크그룹으로손쉽게이전가능함. [oracle@gtdb3-prod3 ~]$./mdbutil.pl --mvmgmtdb --target=+data mdbutil.pl version : 1.95 Moving MGMTDB, it will be stopped, are you sure (Y/N)? Y 2018-07-05 16:49:58: I Checking for the required paths under +DATA 2018-07-05 16:49:59: I Creating new path +DATA/_MGMTDB/PARAMETERFILE 2018-07-05 16:50:03: I Creating new path +DATA/_MGMTDB/CONTROLFILE 2018-07-05 16:50:07: I Creating new path +DATA/_MGMTDB/ONLINELOG 2018-07-05 16:50:10: I Creating new path +DATA/_MGMTDB/DATAFILE 2018-07-05 16:50:14: I Creating new path +DATA/_MGMTDB/TEMPFILE 2018-07-05 16:50:18: I Creating new path +DATA/_MGMTDB/DATAFILE/PDB$SEED 2018-07-05 16:50:20: I Creating new path +DATA/_MGMTDB/DATAFILE/TEMPFILE/PDB$SEED 2018-07-05 16:50:23: I Creating new path +DATA/_MGMTDB/DATAFILE/gtdb_cluster12c 2018-07-05 16:50:25: I Creating new path +DATA/_MGMTDB/TEMPFILE/gtdb_cluster12c 2018-07-05 16:50:26: I Getting MGMTDB Database files location 2018-07-05 16:50:27: I Getting MGMTDB Temp files location 2018-07-05 16:50:27: I Getting MGMTDB PDB PDB$SEED files location 2018-07-05 16:50:27: I Getting MGMTDB PDB PDB$SEED Temp files location 2018-07-05 16:50:28: I Getting MGMTDB PDB GIMR_DSCREP_10 files location 2018-07-05 16:50:28: I Getting MGMTDB PDB GIMR_DSCREP_10 Temp files location 2018-07-05 16:50:34: I Creating temporary PFILE 2018-07-05 16:50:34: I Creating target SPFILE 15
GIMR Tools mdbutil.pl 오라클에서제공하는비공식툴로다른디스크그룹으로이전이손쉽게가능함 2018-07-05 16:50:37: I Stopping the Cluster Health Analysis Resource 2018-07-05 16:50:39: I Stopping mgmtdb 2018-07-05 16:51:01: I Copying MGMTDB DBFiles to +DATA 2018-07-05 16:51:48: I Copying MGMTDB PDB$SEED DBFiles to +DATA 2018-07-05 16:52:05: I Copying MGMTDB PDB DBFiles to +DATA 2018-07-05 17:02:02: I Creating the CTRL File 2018-07-05 17:02:54: I The CTRL File has been created and MGMTDB is now running from +DATA 2018-07-05 17:02:54: I Setting MGMTDB SPFile location 2018-07-05 17:02:55: I Modifing the init parameter 2018-07-05 17:02:55: I Removing old MGMTDB 2018-07-05 17:02:57: I Changing START_DEPENDENCIES 2018-07-05 17:02:58: I Changing STOP_DEPENDENCIES 2018-07-05 17:02:58: I Restarting MGMTDB using target SPFile 2018-07-05 17:04:30: I Startin the Cluster Health Analysis Resource 2018-07-05 17:04:31: I MGMTDB Successfully moved to +DATA! 16
CHM (Cluster Health Monitor) CHM 이란무엇인가? 클러스터상태모니터는메모리와 swap 공간사용, 프로세스, IO 사용및네트워크관련데이터와같은 OS 통계 ( 시스템메트릭 ) 를수집합니다. 클러스터상태모니터는보통실시간으로매초당한번정보를수집합니다. 클러스터상태모니터의성능을확보하고 CPU 사용량오버헤드를줄이기위해 OS 의 API 를사용하여 OS 통계를수집합니다.. 클러스터상태모니터는가능한레벨의허용수준에의하여다량의시스템메트릭및데이터를많이수집합니다. CHM 의목적인무엇인가? 클러스터상태모니터는메모리와 swap 공간사용, 프로세스, IO 사용및네트워크관련데이터와같은 OS 통계 ( 시스템메트릭 ) 를수집합니다. 클러스터상태모니터는보통실시간으로매초당한번정보를수집합니다. 클러스터상태모니터의성능을확보하고 CPU 사용량오버헤드를줄이기위해 OS 의 API 를사용하여 OS 통계를수집합니다.. 클러스터상태모니터는가능한레벨의허용수준에의하여다량의시스템메트릭및데이터를많이수집합니다. CHM 의디스크공간 / 필요공간추정 클러스터상태모니터는클러스터의모든노드에기본적으로 1GB 공간을차지합니다. 수집된데이터의대략적인양은하루노드당 0.5 GB 입니다. repository 의적절한디스크사용량을증가하여 3 일까지의수집한데이터를저장할수있습니다. oclumon manage -get repsize 는초단위의사이즈를표시합니다. 필요한공간을추정하기위해, 다음방식을사용할수있습니다. # of nodes * 720MB * 3 = 3 일보유기간필요한사이즈 eg. for 4 node cluster: 4 * 750 * 3 = 9,000MB 17
CHM (Cluster Health Monitor) CHM 의 repository 크기를늘일수있는가? oclumon manage -repos resize <number in seconds less than 259200>. 259200 으로값을설정하면 72 시간 (3 일 ) 에관하여수집한데이터를저장합니다. 위의공식에따라 72 시간보유설정하는것을권장합니다. 이공간은클러스터의모든노드에서사용할수있어야합니다. 보유시간을 72 시간으로설정이필요한경우 repository 의크기를조정하거나위치를변경하십시오. 어떤플랫폼에서 CHM 수행이가능한가? 11.2.0.1 와 earlier: Linux only (download from OTN) 11.2.0.2: Solaris (Sparc 64 and x86-64 only) 와 Linux. 11.2.0.3: AIX, Solaris (Sparc 64 and x86-64 only), Linux, 와 Windows. 클러스터상태모니터는 Linux Itanium 및 Windows Itanium 같은 Itanium 플랫폼을사용할수없습니다. CHM 의시작및정지는어떻게하는가? $GI_HOME/bin/crsctl modify res ora.crf -attr ENABLED=1 -init $GI_HOME/bin/crsctl start res ora.crf -init $GI_HOME/bin/crsctl stop res ora.crf -init $GI_HOME/bin/crsctl modify res ora.crf -attr ENABLED=0 -init 18