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に関する作業はひとまず終了。次回へつづく
コメント