« Mac de Oracle - 10万円未満 de RAC (11g編)#13 | トップページ | 最近のココログ、重た過ぎる。。。 »

2008年10月14日 (火) / Author : Hiroshi Sekiguchi.

Mac de Oracle - 10万円未満 de RAC (11g編)#14

今回はOracle Cluster File System (OCFS2)のインストール及び構成 その3

  1. ハードウェア構成と価格(Mac De Oracle - 10万円 de RAC #1とMac De Oracle - 10万円 de RAC #5参照のこと)
  2. Linux (CentOS 5.2)のインストール
  3. Openfiler2.3のインストール
  4. Openfiler2.3によるiSCSIボリュームの構成
  5. Oracle RACノードでのiSCSIボリュームの構成 その1その2
  6. Oracle所有者と関連ディレクトリの作成及び環境変数の設定
  7. Oracle向けLinuxサーバーの構成(カーネルパラメータの設定)
  8. hangcheck-timerカーネル・モジュールの構成
  9. Oracle RACノード間リモートアクセスの構成
  10. Oracle RACノード構成ファイルの確認
  11. Oracle Cluster File System (OCFS2)のインストール及び構成 その1その2、その3
  12. Oracle Automatic Storage Management(ASMLib 2.0)のインストール及び構成
  13. Oracle11g R1 インストール事前作業
  14. Oracle11g R1 Clusterwareのインストール
  15. Oracle11g R1 Database softwareのインストール
  16. Oracle11g R1 examplesのインストール
  17. TNS Listenerの構成
  18. Oracle Cluster databaseの作成
  19. Oracle Net Serviceの確認
  20. Oralce RAC ClusterとDatabase構成の確認
  21. Clusterの開始と停止の確認
  22. Oracle Clusterwareプロセス・モニター・デーモンの構成
  23. 簡単なTransparent Application Failover (TAF)の確認
  24. MacOSXからの接続確認(Mac De Oracleではお約束!なので)



11.Oracle Cluster File System (OCFS2)のインストール及び構成 その3

・O2CBの構成
「10万円 de RAC」と同じH/WなのでO2CBのheartbeatのしきい値は以前と同じで81に設定する。configureだけで全て行えるのでocfs2 1.2.3のときより構成は楽。。(Heartbeat dead threshholdに関してはマニュアルP.18 Heartbeat Dead Threshold参照のこと。)
[root@discus1 ocfs2]# /etc/init.d/o2cb offline ocfs2
Stopping O2CB cluster ocfs2: OK
[root@discus1 ocfs2]#
[root@discus1 ocfs2]# /etc/init.d/o2cb unload
Unmounting ocfs2_dlmfs filesystem: OK
Unloading module "ocfs2_dlmfs": OK
Unmounting configfs filesystem: OK
Unloading module "configfs": OK
[root@discus1 ocfs2]#
[root@discus1 ocfs2]# /etc/init.d/o2cb configure
Configuring the O2CB driver.

This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded on
boot. The current values will be shown in brackets ('[]'). Hitting
<ENTER> without typing an answer will keep that current value. Ctrl-C
will abort.

Load O2CB driver on boot (y/n) [n]: y
Cluster stack backing O2CB [o2cb]:
Cluster to start on boot (Enter "none" to clear) [ocfs2]:
Specify heartbeat dead threshold (>=7) [31]: 81
Specify network idle timeout in ms (>=5000) [30000]:
Specify network keepalive delay in ms (>=1000) [2000]: 3000
Specify network reconnect delay in ms (>=2000) [2000]:
Writing O2CB configuration: OK
Loading filesystem "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading filesystem "ocfs2_dlmfs": OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Starting O2CB cluster ocfs2: OK
・OCFS2ファイルシステムのフォーマット
[root@discus1 ˜]# mkfs.ocfs2 -b 4K -C 32K -N 4 -L oracrsfiles /dev/iscsi/crs/part1
mkfs.ocfs2 1.4.1
Cluster stack: classic o2cb
Filesystem label=oracrsfiles
Block size=4096 (bits=12)
Cluster size=32768 (bits=15)
Volume size=2145943552 (65489 clusters) (523912 blocks)
3 cluster groups (tail covers 977 clusters, rest cover 32256 clusters)
Journal size=67108864
Initial number of node slots: 4
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 1 block(s)
Formatting Journals: done
Formatting slot map: done
Writing lost+found: done
mkfs.ocfs2 successful
事前に作成しておいたマウントポイント/u02へOCFS2ファイルシステムをマウントする。また、/etc/fstabも以下のようの編集する。
[root@discus1 ˜]# mount -t ocfs2 -o datavolume,nointr -L "oracrsfiles" /u02
[root@discus1 ˜]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
configfs on /sys/kernel/config type configfs (rw)
ocfs2_dlmfs on /dlm type ocfs2_dlmfs (rw)
/dev/sde1 on /u02 type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)
[root@discus1 ˜]# vi /etc/fstab

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
LABEL=oracrsfiles /u02 ocfs2 _netdev,datavolume,nointr 0 0
[root@discus1 ˜]#


最後に/etc/sysctl.confへ以下の2行を追加(詳細はマニュアルのP.19 Kernel Configuration 参照)。
kernel.panic_on_oops = 1
kernel.panic = 30
[root@discus1 ˜]# vi /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# 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

・・・・中略・・・・
# for Oracle11g
kernel.sem = 250 32000 100 128
fs.file-max = 65536
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.shmmni = 4096
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
kernel.panic_on_oops = 1
kernel.panic = 30

ここでRAC全ノードを再起動する。再起動後、mountコマンドで状態を確認する。
[root@discus1 ˜]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
configfs on /sys/kernel/config type configfs (rw)
ocfs2_dlmfs on /dlm type ocfs2_dlmfs (rw)
/dev/sde1 on /u02 type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)
OCFS2のバージョン確認方法。以前とかわったようだ。以前は/proc/fs/ocfs2/versionで見る事ができたが1.4.1では以下のようにすると確認できる。
[root@discus1 ˜]# mkfs.ocfs2 -V
mkfs.ocfs2 1.4.1
[root@discus1 ˜]#


これでOCFS2に関する作業はひとまず終了。次回へつづく

| |

トラックバック


この記事へのトラックバック一覧です: Mac de Oracle - 10万円未満 de RAC (11g編)#14:

コメント

コメントを書く