業界トップクラスのデータベースエキスパート集団

株式会社アクアシステムズ

Oracle Database Applianceの検証
第4回-2「Oracle RAC構築-ソフトウェア編」

 Oracle Database Applianceの検証

update:

第4回-2「Oracle RAC構築-ソフトウェア編」

著者:金永昊

Oracle Database ApplianceでのOracle RAC構成手順

手順1:OAK Patch (End-User Bundle、Patch Bundle)のダウンロード(Oracle Supportから)

https://support.oracle.comサイトにサインインする。
(My Oracle Support契約アカウントが必要)
・12978712パッチ(End-User Bundle)をダウンロードする。(3.2 GB)
・13565278パッチ(Patch Bundle)をダウンロードする。(389.4 MB)


手順2:ネットワークの初期設定(End-User Bundle / Patch Bundleを取得するために必要)

ネットワークの初期設定

rootユーザーで、/opt/oracle/oak/bin/oakcli configure firstnetコマンドを実行してネットワークの初期設定を行う。


手順3:OAK Patch (End-User Bundle:片方、Patch Bundle:両方)の展開 / 適用

/opt/oracle/oak/bin/oakcli unpack –package /root/p12978712_21020_Linux-x86-64.zip コマンドでEnd-User Bundleを展開する。
(192.168.0.1ノード1側)

/opt/oracle/oak/bin/oakcli –package /root/p13565278_21020_Linux-x86_64.zipコマンドでPatch Bundleを展開し、/opt/oracle/oak/bin/oakcli update –patch 2.1.0.2.0コマンドでPatch Bundleを適用する。
(192.168.0.1ノード1側と、192.168.0.2ノード2側)


手順4:ライセンスキーの登録

My Oracle Supportよりライセンスキーを取得
・“設定 > アセット” からOracle Database Applianceを選択
・Oracle Database Applianceから取得する必要はなし
次のコマンドは、ライセンスキーを登録している例
[root@oak1 ~]# /opt/oracle/oak/bin/oakcli apply core_cofigure_key /root/core_config_key.lic

INFO:Cluster will be rebooted after applying the core_config_key successfully

手順5:Oracle Appliance ManagerでOracle RACを構成 (Customタイプ)

Oracle Appliance Managerを起動するためには、X Windowシステム(X11)上で起動する必要がありますので、X Windows システム上でない場合は、コマンドプロンプトで ”startx” コマンドを実行してX Windowsシステムを起動します(前提条件)。
※基本的にOracle Database Applianceは、モニター、キーボド、マウス装置はないです。 Oracle Database ApplianceのOS起動run levelは3(テキスト- Full Multiuser Mode)です。


/opt/oracle/oak/bin/oakcli deployコマンドを実行すると、Oracle Appliance ManagerのWelcome画面が表示されます

Oracle Appliance ManagerのWelcome画面

Welcome - Step1
Configuration Type – Step2
System Information – Step3
Generic Network – Step4
Public Network – Step5
Other Network – Step6
Database Information – Step7
ASR Information – Step8
CloudFS Information – Step9
Summary – Step10
Install progress – Step11
Complete – Step12

必要な情報を入力してインストールします。


Oracle Appliance Managerでは、TypicalとCustom構成タイプから一つを選んで構成できます。 Custom構成タイプを選んでVery LargeサイズでOracle RACを構成すると1時間30分かかります。 次の表は、TypicalとCustomのインストール・ステップを比較した表です。


表 構成タイプ別比較

順番

Typical構成タイプ

Custom構成タイプ

1

Welcome

Welcome

2

Configuration Type

Configuration Type

3

System Information

System Information

4

Network Information

Generic Network

5

Database Information

Public Network

6

Summary

Other Network

7

Install Progress

Database Information

8

Complete

ASR Information

9

 

Cloud FS Information

10

 

Summary

11

 

Install Progress

12

 

Complete

 


Oracle RACとのインストーラー比較

通常Oracle RACを構築するには、Grid Infrastructure、Oracle DBのインストール、DBCA(Database Configuration Assistant)GUIツールを使用してインストールします。 Oracle Database ApplianceでOracle RACを構築する場合は、Oracle Appliance Manager Step Wizardを使用してインストールをします。

次の表はOracleソフトウェアが提供するGUIツールのステップとOracle Appliance Manager GUIツール(Custom構成タイプ)のステップとの相違点を比較してみた表です。

表 Oracle Grid InfrastructureとOracle Appliance Manager の
インストール・ステップ比較

RAC手順1:Oracle Grid Infrastructure Step

Appliance Manager Step

Grid Infrastructure - インストール・オプションの選択

System Information

Grid Infrastructure - インストールタイプの選択

Configuration Type

Grid Infrastructure - 製品言語の選択

Database Information

Grid Infrastructure - Grid プラグ・アンド・グレイの情報

Public Network

Grid Infrastructure - クラスタ・ノードの情報

Grid Infrastructure - ネットワーク・インタフェースの使用方法指定

Grid Infrastructure - 記憶域オプションの情報

Database Information

Grid Infrastructure - ASMディスク・グループの作成

Grid Infrastructure - ASMパスワードの設定

Grid Infrastructure - 障害の分離のサポート

Grid Infrastructure - 権限つきオペレーティング・システム・グループ

Grid Infrastructure - インストール場所の指定

Grid Infrastructure - インベントリの作成

Grid Infrastructure - 前提条件チェックの実行

Grid Infrastructure - 製品のインストール

Install Progress


表 Oracle DatabaseとOracle Appliance Managerの
インストール・ステップ比較

RAC手順2:Oracle データベースのインストールStep

Appliance Manager Step

Oracle DBのインストール - インストール・オプションの選択

Database Information

Oracle DBのインストール - Gridインストール・オプション

System Information

Oracle DBのインストール - 製品言語の選択

Database Information

Oracle DBのインストール - データベース・エディションの選択

Oracle DBのインストール - インストール場所の指定

Oracle DBのインストール - 権限つきOS・グループ

Oracle DBのインストール - 前提条件チェックの実行

Install Progress

Oracle DBのインストール - 製品のインストール

Oracle DBのインストール - 構成スクリプトの実行


表 Database Configuration AssistantとOracle Appliance Managerの
インストール・ステップ比較

RAC手順3:Oracle Database Configuration Assistant Step

Appliance Manager Step

DBCA - データベースタイプの選択

System Information

DBCA - 実行する操作を選択

Database Information

DBCA - データベース・テンプレート

DBCA - データベース識別情報

DBCA - 管理オプション

DBCA - データベース資格証明

DBCA - データベース・ファイルの位置

DBCA - リカバリ構成

DBCA - データベース・コンテンツ

DBCA - 初期化パラメータ

DBCA - データベース記憶域

DBCA - 作成オプション

Summary

Oracleソフトウェアが提供するGUIツールにおいて、ネットワークに関する設定ステップはAppliance ManagerのPublic Network Stepに相当し、データベースに関する設定ステップはAppliance ManagerのDatabase Informationに相当していることが分かりました。


RAC構成後のOracle Database Applianceソフトウェア設定情報

Oracle Appliance ManagerでOracle RAC構成が完了すると、OEMDC (Oracle Enterprise Manager Database Control)管理ツールも構成されます。確認内容は表やOEMDC画面で記述します。

表 Oracle Database Applianceのディレクトリパス情報
項目

Grid Home

/u01/app/11.2.0/grid

Grid Base

/u01/app/grid

Oracle Home

/u01/app/oracle/product/11.2.0/dbhome_1

Oracle Base

/u01/app/oracle

Oracle Inventory

/u01/app/oraInventory


表 Oracle Database ApplianceのASM情報
(ディスク・グループとストレージ)
項目

ASM Diskgroup +DATA size
(業務データベース用)

1.6 TB (high redundancy) or
3.2 TB (high redundancy with external storage for backups)

ASM Diskgroup +RECO size
(高速リカバリ領域用)

2.4 TB (high redundancy) or
0.8 TB (high redundancy with external storage for backups

ASM Diskgroup +REDO size
(REDOログファイル用)

97.3 GB (high redundancy)

Data disk names

HDD_Ex_Sxx_wwidp1, where Sxx is the range S00-S19

Reco disk names

HDD_Ex_Sxx_wwidp2, where Sxx is the range S00-S19

Redo disk names

SSD_Ex_Sxx_wwidp1, where Sxx is the range S20-S23

Oracle ACFS (/cloudfs)

/dev/asm/acfsvol

Physical Volume name、
Volume size、Extent size

/dev/md1、465.66 GB、32768 (32 MB)

Volume Group name、
format、size

VolGroupSys、lvm2、465.66 GB

Logical Volume name (Root)

/dev/mapper/VolGroupSys-LogVolRoot、30 GB

Logical Volume name (Opt)

/dev/mapper/VolGroupSys-LogVolOpt、59 GB

Logical Volume name (Swap)

/dev/mapper/VolGroupSys-LogVolSwap、25165816

Logical Volume name (U01)

/dev/mapper/VolGroupSys-LogVolU01、97 GB

Block device (Opt、root、Swap)

253:1、253:0、253:3

Database block size

8192 KB (4096-32768KB まで選択可能)


表 Oracle Database ApplianceのOracle グループとユーザー情報
項目

Oracle Grid Infrastructure installation owner

grid, password:welcome1 UID 1000

Oracle Database installation owner

oracle, password:welcome1, UID 1001

Oracle Inventory system privileges group

oinstall, GID 1001

Oracle ASM Administrators system privileges

asmadmin, GID 1006

Oracle ASM Users system privileges

asmdba, GID 1004

Oracle ASM Operator system privileges

asmoper, GID 1005

Oracle Database Administrators system privileges

dba, GID 1002

Oracle Database Operator system privileges

racoper, GID 1003


表 Oracle Database Applianceのシステム設定情報
項目

インストールされているrpmパッケージ

Oracle Databaseのインストール前の要件として、
必要なrpmパッケージがインストールされていました。

システムカーネル・パラメータ
(/etc/sysctl.conf)

# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality
of the kernel
# Controls whether core dumps will append the PID to
the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
# Controls the default maxmimum size of a mesage queue
# Controls the maximum shared segment size, in bytes
# Controls the maximum number of shared memory
segments, in pages
# For 11g, Oracle-Validated setting for fs.file-max
is 6815744
# For 10g, uncomment 'fs.file-max = 327679', and comment
'fs.file-max = 6553600' entry and re-run sysctl -p
# fs.file-max = 327679
fs.file-max = 6815744
# Oracle-Validated setting for kernel.msgmni is 2878
kernel.msgmni = 2878
# Oracle-Validated setting for kernel.msgmax is 8192
kernel.msgmax = 8192
# Oracle-Validated setting for kernel.msgmnb is 65536
kernel.msgmnb = 65536
# Oracle-Validated setting for kernel.sem is '250 32000 100 142'
kernel.sem = 250 32000 100 142
# Oracle-Validated setting for kernel.shmmni is 4096
kernel.shmmni = 4096
# Oracle-Validated setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824
# Oracle-Validated setting for kernel.shmmax is 4398046511104
on x86_64 and 4294967295 on i386 architecture.
Refer Note id 567506.1
kernel.shmmax = 4398046511104
# Oracle-Validated setting for kernel.sysrq is 1
kernel.sysrq = 1
# Oracle-Validated setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
# For 11g, Oracle-Validated setting for net.core.rmem_max
is 4194304
# For 10g, uncomment 'net.core.rmem_max = 2097152', comment
'net.core.rmem_max = 4194304' entry and re-run sysctl -p
# net.core.rmem_max = 2097152
net.core.rmem_max = 4194304
# Oracle-Validated setting for net.core.wmem_default
is 262144
net.core.wmem_default = 262144
# For 11g, Oracle-Validated setting for net.core.
wmem_max=2097152
# For 10g, uncomment 'net.core.wmem_max=2097152
# net.core.wmem_max=2097152
net.core.wmem_max=2097152
# Oracle-Validated setting for fs.aio-max-nr is 3145728
fs.aio-max-nr = 3145728
# For 11g, Oracle-Validated setting for net.ipv4.
ip_local_port_range
is 9000 65500
# For 10g, uncomment 'net.ipv4.ip_local_port_range
= 1024 65000', comment 'net.ipv4.ip_local_port_range
= 9000 65500'
entry and re-run sysctl -p
# net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.ip_local_port_range = 9000 65500
# Oracle-Validated setting for vm.min_free_kbytes
is 51200 to avoid OOM killer
vm.min_free_kbytes = 51200
vm.swappiness=100
fs.suid_dumpable=1
kernel.core_pattern=core.%e.%p
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_filter=1
vm.nr_hugepages=26000

リソース制限設定
(/etc/security/limits.conf)

# Oracle-Validated setting for nofile soft limit is 131072
oracle   soft   nofile    131072
# Oracle-Validated setting for nofile hard limit is 131072
oracle   hard   nofile    131072
# Oracle-Validated setting for nproc soft limit is 131072
oracle   soft   nproc    131072
# Oracle-Validated setting for nproc hard limit is 131072
oracle   hard   nproc    131072
# Oracle-Validated setting for core soft limit is unlimited
oracle   soft   core    unlimited
# Oracle-Validated setting for core hard limit is unlimited
oracle   hard   core    unlimited
# Oracle-Validated setting for memlock    72000000
oracle   soft   memlock          72000000
# Oracle-Validated setting for memlock    72000000
oracle   hard   memlock        72000000
grid   soft   nofile    131072
grid   hard   nofile    131072
grid   soft   nproc    131072
grid   hard   nproc    131072
grid   soft   core    unlimited
grid   hard   core    unlimited
grid   soft   memlock             72000000
grid   hard   memlock           72000000

oracleユーザーの環境変数
(.bash_profile)

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
                . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_HOME=/u01/app/oracle/product/11.2.0
/dbhome_1
export PATH=$ORACLE_HOME/bin:.:$PATH

gridユーザーの環境変数

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
                . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
ulimit -S -c unlimited > /dev/null 2>&1
export ORA_OAK_HOME=/opt/oracle/oak
export ORACLE_HOME=/u01/app/11.2.0/grid
export PATH=$ORA_OAK_HOME/bin:$ORACLE_HOME
/bin:.:$PATH

ネットワーク設定
(/etc/hosts)

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1             localhost6.localdomain6 localhost6
# Following added by OneCommand
127.0.0.1    localhost.localdomain localhost
# PUBLIC HOSTNAMES
# PRIVATE HOSTNAMES
192.168.16.24    test011-priv0.localdomain.com test011-priv0
192.168.16.25    test012-priv0.localdomain.com test012-priv0
192.168.17.24    test011-priv1.localdomain.com test011-priv1
192.168.17.25    test012-priv1.localdomain.com test012-priv1
# VIP HOSTNAMES
192.168.0.5    test011-vip.localdomain.com test011-vip
192.168.0.6    test012-vip.localdomain.com test012-vip
# NET(0-3) HOSTNAMES
192.168.0.3    test011.localdomain.com test011
192.168.0.4    test012.localdomain.com test012
#SCAN IP
192.168.0.7     test01-scan.localdomain.com     test01-scan

Oracleソフトウェアのオプション、コンポーネント、バージョン

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0
- 64bit Production
With the Partitioning, Real Application Clusters,
Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0
- 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production


表 Oracle Net Serviceの情報
項目

Oracle Net Listener
(listener.ora)

LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))
)
)
LISTENER_SCAN1=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=
ONENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON

ローカル・ネーミング・メソッドの構成
(tnsnames.ora)

TESTDB01 =
  (DESCRIPTION =
    (ADDRESS =
(PROTOCOL = TCP)
(HOST = test01-scan)
(PORT = 1521)
)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testdb01)
    )
  )

※Oracle Database ApplianceでのOracleリスナーは、SCANリスナーとして構成されています。


表 Oracle初期化パラメータの主な情報

データベース・
インスタンス

testdb012.__db_cache_size=45097156608
testdb011.__db_cache_size=45097156608
testdb012.__java_pool_size=134217728
testdb011.__java_pool_size=134217728
testdb012.__large_pool_size=134217728
testdb011.__large_pool_size=134217728
testdb012.__pga_aggregate_target=25769803776
testdb011.__pga_aggregate_target=25769803776
testdb012.__sga_target=51539607552
testdb011.__sga_target=51539607552
testdb012.__shared_io_pool_size=0
testdb011.__shared_io_pool_size=0
testdb012.__shared_pool_size=5771362304
testdb011.__shared_pool_size=5771362304
testdb012.__streams_pool_size=0
testdb011.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/testdb01/adump'
*.audit_sys_operations=TRUE
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.2.0'
*.control_files='+DATA/testdb01/control01.ctl'
*.cpu_count=24
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+REDO'
*.db_domain=''
*.db_files=1024
*.db_lost_write_protect='TYPICAL'
*.db_name='testdb01'
*.db_recovery_file_dest='+RECO'
*.db_recovery_file_dest_size=499289948160
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=testdb01XDB)'
*.fast_start_mttr_target=300
*.filesystemio_options='setall'
*.global_names=TRUE
testdb012.instance_number=2
testdb011.instance_number=1
*.log_archive_format='%t_%s_%r.dbf'
*.log_buffer=67108864
*.nls_language='JAPANESE'
*.nls_territory='JAPAN'
*.open_cursors=1000
*.parallel_min_servers=0
*.parallel_threads_per_cpu=2
*.pga_aggregate_target=25769803776
*.processes=2400
*.remote_listener='test01-scan:1521'
*.session_cached_cursors=100
*.sga_target=51539607552
*.undo_retention=900
testdb012.undo_tablespace='UNDOTBS2'
testdb011.undo_tablespace='UNDOTBS1'

ASM・
インスタンス

NAME                                  VALUE
-------------------------------------------------------------------
asm_diskgroups                        RECO, DATA, REDO
asm_diskstring                        /dev/mapper/*D_*p*
asm_power_limit                       1
audit_file_dest                       /u01/app/11.2.0/grid/rdbms/audit
audit_sys_operations                  FALSE
background_core_dump                  partial
background_dump_dest                  /u01/app/grid/diag/asm/+asm/+ASM1/trace
cluster_database                      TRUE
cluster_database_instances            4
core_dump_dest                /u01/app/grid/diag/asm/+asm/+ASM1/cdump
db_cache_size                         integer 0
db_unique_name                        +ASM
diagnostic_dest                       /u01/app/grid
file_mapping                          FALSE
instance_name                         +ASM1
instance_number                       1
instance_type                         asm
large_pool_size                       12M
local_listener       (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=192.168.0.5)(PORT=1521))))
memory_max_target                     1G
memory_target                         1G
pga_aggregate_target                  0
processes                             600
service_names                         +ASM
sessions                              936
sga_max_size                          1G
sga_target                            0
shared_pool_reserved_size             29569843
shared_pool_size                      0
sort_area_size                        65536
spfile              +DATA/test01-c/asmparameterfile/registry.253.775841735
statistics_level                      TYPICAL
user_dump_dest              /u01/app/grid/diag/asm/+asm/+ASM1/trace
workarea_size_policy                  AUTO

※Oracleインスタンスは、手動メモリー管理で自動共有メモリー管理(sga_target)と自動PGAメモリー管理(pga_aggregate_target)になっています。
※ASMインスタンスは、自動メモリー管理(memory_target)になっていて、HIGH冗長性でRECO、DATA、 REDOという三つのディスク・グループで構成されています。
※Oracle Database ApplianceでのOracle Databaseは、Oracle Managed Filesを使用してデータベース・ファイルを管理しています。

ASM 各ディスク・グループの用途は次の通りです。
DATAディスク・グループ:表領域のデータファイル、一時ファイル、制御ファイル、ブロック・チェンジ・トラッキング・ファイルなどが作成される場所
REDOディスク・グループ:REDOログ・ファイルが作成される場所
RECOディスク・グループ:多重化REDOログ、多重化制御ファイル、RMANバックアップ・ファイル、アーカイブ・ログ、フラッシュバック・ログファイル、RACのOracle Cluster Registryファイルなどが格納される高速リカバリ領域のデフォルトの場所


Oracle Enterprise Manager Database Controlでのデータベース確認画面

クラスタ・データベースのホームのウェブページ

図 15 クラスタ・データベースのホームのウェブページ
https://192.168.0.7:1158/emでアクセスし、ログインする。
ユーザー名:sys
パスワード:welcome1

クラスタ・インターコネクトのウェブページ

図 クラスタ・インターコネクトのウェブページ

自動ストレージ管理・ホームのウェブページ

図 自動ストレージ管理・ホームのウェブページ
ASM(自動ストレージ管理)ログイン
ユーザー名:sys
パスワード:welcome1
接続モード:sysdba

自動ストレージ管理・ディスク・グループのウェブページ

図 自動ストレージ管理・ディスク・グループのウェブページ

クラスタ・データベースの表領域のウェブページ

図 クラスタ・データベースの表領域のウェブページ

表領域のデータファイルの一覧

図 表領域のデータファイルの一覧



Oracle Database ApplianceでのOracle RAC環境のcleanup

インストールしたOracle RAC環境をいつでもcleanupできるスクリプトが用意されています。

rootユーザーに切り替えて次のコマンドを実行すれば、終了
[root@test011 ~]# /opt/oracle/oak/onecmd/cleanupDeploy.pl

※ログ・ファイルは、/opt/oracle/oak/onecmd/tmp ディレクトリに各ステップ別作成されます。

cleanupのステップは8段階でした。

step 1 SetupSSHroot
step 2 deinstallASR
step 3 DeinstallGI
step 4 resetmultipathconf
step 5 DropUsersGroups
step 6 resetnetwork
step 7 resetpasswd

step 8 reboot

Step 1からstep8まで、10分程度で終わりました。


第5回に続きます……


業界トップクラスのデータベースエキスパート集団
アクアシステムズ

データベースに関するすべての課題、トラブル、お悩みを解決します。
高難易度、複雑、他社対応不可案件など、お気軽にご相談ください。