Bare Metal Solution での RAC インストールに関するベスト プラクティス
このページでは、Bare Metal Solution に Oracle RAC をインストールする前に確認すべきベスト プラクティスについて説明します。
1. 18c Oracle GI クラスタ名の長さに関するバグ
Oracle GI 18C には、Bare Metal Solution に影響するクラスタ名の長さのバグがあります。
推奨される対応:
クラスタ名は 15 文字未満にする必要があります。そうでない場合、root.sh
スクリプトは最初のステップで失敗し、エラー host name is too long
が返されます。デフォルトのクラスタ名は 15 文字を超えているため、スクリプトの実行前に変更する必要があります。
2. SSH
OPEN ssh
の問題が原因で SSH 認証が失敗する場合があります。
OpenSSH_6.7: ERROR [INS-06003] Failed to setup passwordless SSH connectivity
During Grid Infrastructure Install (Doc ID 2111092.1)
推奨される対応:
Edit the `/etc/ssh/sshd_config` file to contain the following line:
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
sshd サービスを再起動して変更を反映します。
/etc/init.d/sshd restart
3. VNC サーバー
VNC などの任意のサーバーは、デフォルトの OS ファイアウォール構成によってブロックされます。代わりに、SSH を介して Xwindows または VNC をトンネルします。
ssh -L 5901:localhost:5901 bms-host
vncviewer localhost:1
4. ルート ファイル システム
ルート /
ファイル システムに十分な空き容量があることを確認します。
ホストがルート ファイル システムを作成するには、少なくとも 20 GB の空き容量が必要です。
5. DNS
Cloud DNS を使用していない場合は、ホストの IP アドレスを解決する Bare Metal Solution に独自のネームサーバーをインストールします。Oracle Grid Infrastructure では、nslookup
コマンドを使用して DNS 名を取得します。nslookup
は /etc/hosts
を使用しません。
# install these files:
yum makecache
yum install dnsmasq
## Edit /etc/dnsmasq.conf and add these lines:
port=53
domain-needed
bogus-priv
strict-order
expand-hosts
domain=localdomain
address=/.localdomain/127.0.0.1
address=//127.0.0.1
listen-address=127.0.0.1
resolv-file=/etc/dnsmasq-resolv.conf
# Save the file.
# The files /etc/dnsmasq-resolv.conf and /etc/resolv.conf should contain only
# the following one line. Edit them if this is not the case.
nameserver 127.0.0.1
# Start the dnsmasq service:
systemctl restart dnsmasq
systemctl status dnsmasq
# verify the host names are resolved:
nslookup <host name 1>
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: <host name 1>
Address: 192.168.1.10
nslookup <host name 2>
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: <host name 2>
Address: 192.168.1.11
6. NTP のインストール
ネットワーク タイム プロトコル(NTP)をインストールし、すべての RAC ノードが jumpshot
または内部 NTP サーバーと時刻を同期していることを確認します。
# install and start the NTP service
yum install ntp
systemctl start ntpd
# Add the following line to the /etc/ntp.conf file. In this case we are syncing
# with our bastion which is 10.x.x.x in this case. This can be your internal NTP
server. 192.x.x.x is your host.
restrict 192.x.x.x mask 255.255.255.0 nomodify notrap
server 10.x.x.x prefer
ntpdate -qu {your host name}
7. root.sh
root.sh
を実行する場合は、ノードを 1 つずつ実行します。
8. Localhost
localhost
が 127.0.0.1
に解決されることを確認します。ホストは、/etc/hosts
ファイルに localhost を格納しません。
9. Ulimit
root ユーザーと Oracle ユーザーの ulimit に、十分な制限があることを確認してください。
10. SCP ファイルのコピーでは鍵交換に時間がかかる
これは、Bare Metal Solution ssh デーモンの構成の問題により発生します。
推奨される対応:
# Modify your ssh config on the host server side.
vi /etc/ssh/sshd_config
# Add this line or modify it if you already set.
ClientAliveInterval 420
# Restart SSH
service sshd restart
11. OracleASM
Oracle ASMLIB を使用している場合は、シングルパスの ASM デバイスが Oracle Automatic Storage Management によって最初に選択されないように、ORACLEASM_SCANORDER 環境変数を設定します。
推奨される対応: 次のようにスキャン順序を設定します。
ORACLEASM_SCANORDER="multipath sd"
12. CRS の root.sh または OCSSD が No Network HB
エラーで失敗する
ノードが 169.254.169.254
IP アドレスに ping を実行すると、Oracle Cluster Ready Services(CRS)を使用して root.sh
スクリプトが失敗する可能性があります。169.254.169.254
は、 Google Cloudにインスタンスを登録する Google Cloud メタデータ サービスです。この IP アドレスをブロックすると、 Google Cloud VM は起動できません。ただし、Bare Metal Solution の RAC サーバーは HAIP
の通信ルートを中断する可能性があるため、HAIP
と通信する際に問題が発生します。その場合は、IP アドレスをブロックするか、HAIP
を無効にする必要があります。次の例は、route ステートメントによって IP をブロックする方法を示しています。Linux の root ステートメントは永続ではないため、ネットワークまたは rc スクリプトに追加する必要があります。
推奨される対応: root.sh
を再実行する前に、すべてのノードで次のコマンドを実行します。
/sbin/route add -host 169.254.169.254 reject
# To make a permanent change, add the route statement to rc script.
chmod +x /etc/rc.d/rc.local
# Edit /etc/rc.d/rc.local and add this line:
/sbin/route add -host 169.254.169.254 reject
# Enable rc-local service
systemctl status rc-local.service
systemctl enable rc-local.service
systemctl start rc-local.service
13. Linux カーネルのバグ
Redhat、OVM、SUSIE LINUX に多数の LUN が接続されていると、再起動がハングします。
推奨される対応: デフォルトのウォッチドッグ タイムアウト値を増やします。
# Under /etc/systemd create a folder named: system.conf.d
# In this folder, create a *.conf file, example:
/etc/systemd/system.conf.d/kernel-reboot-workaround.conf
# The file needs to contain the following information:
[Manager]
RuntimeWatchdogSec=5min
ShutdownWatchdogSec=5min
または
代わりに、次の回避策を試してください。
# Edit the /etc/default/grub file.
# remove quote from settings, then add the following after this parameter
# GRUB_CMDLINE_LINUX :
acpi_no_watchdog DefaultTimeoutStartSec=900s DefaultTimeoutStopSec=900s
2-3. Rebuild the grub
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
14. Max_sector_kb の問題
Oracle Grid Infrastructure(GI)のインストールが、CRS インストール ログと /var/log/messages
のエラー exceed Max_sector_size
で失敗する場合があります。
推奨される対応:
# Add max_sectors_kb 1024 under the multipath entry for all the devices (WWIDs)
# that need the setting modified (under multipaths). All of them should look
# similar to the following: multipath
{ wwid xxxxxyyyyyzzzz1111222
alias asm-data1
max_sectors_kb 1024 }
# Delete the map (multipath -f ). This needs to be done for all devices that
# need the setting modified Ex: multipath -f casm-dat001
# Reload the map: multipath -r
# In order to make this setting persistent across reboots, `initramfs` needs to
# be regenerated (the following command will regenerate all kernel versions):
KERNELS=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
for kernel_version in $KERNELS
do
dracut -v -f -a multipath /boot/initramfs-$kernel_version.img
done
15. 12C Grid Infrastructure の問題
12C Grid Infrastructure が Rejecting connection from node 2 as
MultiNode RAC isn't supported or certified in this configuration
で失敗することがあります。
原因:
IP 169.254.169.254
は、Cloud VM のローカル メタデータ サービスに転送されるため、Bare Metal Solution ホストが Cloud VM のように見えます。このような構成では、Cloud VM のプライベート サービス アカウント キーも漏洩する可能性があります。
推奨される対応:
NAT 構成のセキュリティへの影響を考慮して、可能な限り外部ネットワーク アクセスを制限します。
Cloud VM 上のメタデータ サービスへのアクセスをブロックします。
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -d 169.254.169.254 -j REJECT --reject-with icmp-host-unreachable
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -d 169.254.169.254 -j REJECT --reject-with icmp-host-unreachable
BMS ホストでのメタデータ サービスへのアクセスをブロックします。
firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -d 169.254.169.254 -j REJECT --reject-with icmp-host-unreachable
firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -d 169.254.169.254 -j REJECT --reject-with icmp-host-unreachable