忍者ブログ
株のポジショントレード(数週間~数ヵ月)、ブックビルディングの記録。でしたが、今はoracleの備忘録。
2025-061 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 prev 05 next 07
1  2  3  4  5  6  7  8  9 
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

・x86(32bit)の部分を確認。
→結果、gcc-c++だけインストールされていなかったので、yum installでインストールした。

[root@db01eth0 ~]# rpm -qa | grep binutils
binutils-2.17.50.0.6-12.el5
[root@db01eth0 ~]# rpm -qa | grep compat-
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
compat-libstdc++-33-3.2.3-61
compat-libstdc++-296-2.96-138
avahi-compat-libdns_sd-0.6.16-6.el5
[root@db01eth0 ~]# rpm -qa | grep elfutils-libelf-
elfutils-libelf-devel-static-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
elfutils-libelf-0.137-3.el5
[root@db01eth0 ~]# rpm -qa | grep glibc-
glibc-2.5-42.el5_4.2
glibc-common-2.5-42.el5_4.2
glibc-devel-2.5-42.el5_4.2
glibc-headers-2.5-42.el5_4.2
[root@db01eth0 ~]# rpm -qa | grep gcc
gcc-4.1.2-46.el5_4.1
libgcc-4.1.2-46.el5_4.1
[root@db01eth0 ~]# yum install gcc-c++
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirrors.163.com
 * base: mirrors.163.com
 * extras: ftp.hostrino.com
 * updates: mirror.nus.edu.sg
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.i386 0:4.1.2-46.el5_4.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================
 Package            Arch            Version                        Repository          Size
============================================================================================
Installing:
 gcc-c++            i386            4.1.2-46.el5_4.1               updates            3.4 M

Transaction Summary
============================================================================================
Install      1 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        

Total download size: 3.4 M
Is this ok [y/N]: y
Downloading Packages:
gcc-c++-4.1.2-46.el5_4.1.i386.rpm                                    | 2.3 MB     00:33    
http://mirror.nus.edu.sg/centos/5.4/updates/i386/RPMS/gcc-c%2B%2B-4.1.2-46.el5_4.1.i386.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
gcc-c++-4.1.2-46.el5_4.1.i386.rpm                                    | 3.4 MB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : gcc-c++                                                              1/1

Installed:
  gcc-c++.i386 0:4.1.2-46.el5_4.1                                                          

Complete!
[root@db01eth0 ~]# rpm -qa | grep gcc
gcc-c++-4.1.2-46.el5_4.1
gcc-4.1.2-46.el5_4.1
libgcc-4.1.2-46.el5_4.1
[root@db01eth0 ~]# rpm -qa | grep libaio-
libaio-0.3.106-3.2
libaio-devel-0.3.106-3.2
[root@db01eth0 ~]# rpm -qa | grep libgcc-
libgcc-4.1.2-46.el5_4.1
[root@db01eth0 ~]# rpm -qa | grep libstdc++-
compat-libstdc++-33-3.2.3-61
compat-libstdc++-296-2.96-138
libstdc++-devel-4.1.2-46.el5_4.1
libstdc++-4.1.2-46.el5_4.1
[root@db01eth0 ~]# rpm -qa | grep make-
make-3.81-3.el5
[root@db01eth0 ~]# rpm -qa | grep sysstat-
sysstat-7.0.2-3.el5
[root@db01eth0 ~]# rpm -qa | grep unixODBC-
unixODBC-devel-2.2.11-7.1
unixODBC-2.2.11-7.1
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# cat /proc/version
Linux version 2.6.18-164.9.1.el5PAE (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Tue Dec 15 21:41:47 EST 2009
[root@db01eth0 ~]# uname -r
2.6.18-164.9.1.el5PAE
[root@db01eth0 ~]# /sbin/modinfo ocfs2
modinfo: could not find module ocfs2
[root@db01eth0 ~]#

※2号機も同様に設定。




PR
・Oracleインストレーションガイドに書いてあることをいくつかメモ。

注意: UDPはOracle RAC用のデフォルトのインターコネクト・プロトコルで、TCPはOracle Clusterware用のインターコネクト・プロトコルです。インターコネクト用のスイッチを使用する必要があります。専用のスイッチを使用することを お薦めします。インターコネクト用のトークン・リングまたはクロスオーバー・ケーブルはサポートされていません。」

「使用可能なDNSがない場合は、システムのhostsファイル(/etc/hosts)にホスト名とIPアドレスを記述します。」

「VIPはパブリック・インタフェースと同じサブネット上にある」

「プライベート・ネットワークIPアドレスを使用したネットワークではファイアウォールを使用しないでください。プライベート・ネットワークIPアドレスによってインターコネクト・トラフィックがブロックされる可能性があるためです。」
↑★これは特に対処せず。必要に応じて後ほど対処。★

「インストールする前に、pingコマンドを実行し、デフォルトのゲートウェイにアクセスできることを確認します。デフォルトのゲートウェイを検出するには、routeコマンドを使用します(オペレーティング・システムのヘルプを参照)。」
↑★なぜ必要なのかわかってない。保留。★

「インストール後に、VIPアドレス、またはVIPに関連付けたホスト名のいずれかを使用するようにクライアントを構成します。」
↑★クライアント端末まだ無いし。。保留。★

「アンダースコア(_)を使用するホスト名は使用できません。」

「インストールを開始する前に、クラスタ内の各メンバー・ノードが、できるかぎり同じ日時に設定されいることを確認します。」
↑★インストール直前まで両ノードでNTP起動させておくことにより善処する予定。(インストール作業時は、eth0がDHCP→プライベートIPアドレスになってしまうので。。)★

「NASデバイスまたはNFSマウントを使用しているOracle RACデータベースでのパブリック・ネットワーク障害を防ぐには、次のコマンドをrootとして入力し、ネーム・サービス・キャッシュ・デーモン(nscd)を有効にします。
# /sbin/service nscd start」
↑★以下の様に設定★
[root@db01eth0 ~]# /sbin/service nscd start
nscd を起動中:                                             [  OK  ]
[root@db01eth0 ~]# chkconfig --list nscd
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@db01eth0 ~]# chkconfig nscd on
[root@db01eth0 ~]# chkconfig --list nscd
nscd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@db01eth0 ~]#

※2号機も同様に設定。
[root@db01eth0 ~]# /usr/sbin/groupadd -g 500 dba
[root@db01eth0 ~]# /usr/sbin/useradd -u 200 -g dba oracle
[root@db01eth0 ~]# id oracle
uid=200(oracle) gid=500(dba) 所属グループ=500(dba)
[root@db01eth0 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# ls -l /etc/*ora*
-rw-rw-r-- 1 oracle 501 678 11月 15 18:14 /etc/oratab
[root@db01eth0 ~]# rm /etc/*ora*
rm: remove 通常ファイル `/etc/oratab'? y
[root@db01eth0 ~]#
[root@db01eth0 ~]#


[root@db01eth0 ~]# mkdir -p /opt/crs1110
[root@db01eth0 ~]# chown -R oracle:dba /opt/crs1110
[root@db01eth0 ~]# chmod 775 /opt/crs1110
[root@db01eth0 ~]# ls -l /opt
合計 12
drwxr-xr-x 3 root   root 4096 10月  2 03:02 ORCLfmap
drwxrwxr-x 2 oracle dba  4096 12月 27 06:47 crs1110
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# mkdir /opt/ORACLE
[root@db01eth0 ~]# chown oracle:dba /opt/ORACLE
[root@db01eth0 ~]# chmod 775 /opt/ORACLE
[root@db01eth0 ~]# ls -l /opt
合計 16
drwxrwxr-x 2 oracle dba  4096 12月 27 07:12 ORACLE
drwxr-xr-x 3 root   root 4096 10月  2 03:02 ORCLfmap
drwxrwxr-x 2 oracle dba  4096 12月 27 06:47 crs1110
[root@db01eth0 ~]#


[root@db01eth0 ~]# grep MemTotal /proc/meminfo
MemTotal:      8180904 kB
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# grep SwapTotal /proc/meminfo
SwapTotal:     2031608 kB
[root@db01eth0 ~]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/mapper/VolGroup00-LogVol01         partition       2031608 0       -1
[root@db01eth0 ~]# free
             total       used       free     shared    buffers     cached
Mem:       8180904     830604    7350300          0      59080     511576
-/+ buffers/cache:     259948    7920956
Swap:      2031608          0    2031608
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# dd if=/dev/zero of=/swapfile bs=1024k count=6144
6144+0 records in
6144+0 records out
6442450944 bytes (6.4 GB) copied, 45.5988 seconds, 141 MB/s
[root@db01eth0 ~]# mkswap /swapfile
Setting up swapspace version 1, size = 6442446 kB
[root@db01eth0 ~]# swapon /swapfile
[root@db01eth0 ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/VolGroup00-LogVol01         partition       2031608 0       -1
/swapfile                               file            6291448 0       -2
[root@db01eth0 ~]# vi /etc/fstab
[root@db01eth0 ~]# cat /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
192.168.131.3:/nfs      /mnt/nfs                nfs     rw,rsize=32768,wsize=32768,hard,intr,noac  0 0
/swapfile                swap                    swap    defaults        0 0
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# df -kh /tmp
Filesystem          サイズ  使用  残り 使用% マウント位置
/dev/mapper/VolGroup00-LogVol00
                      130G  9.6G  114G   8% /
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# free
             total       used       free     shared    buffers     cached
Mem:       8180904    7280548     900356          0      67696    6815856
-/+ buffers/cache:     396996    7783908
Swap:      8323056          0    8323056
[root@db01eth0 ~]# uname -m
i686
[root@db01eth0 ~]#

※2号機も同様に設定。
【カーネルパラメータ:Clusterwareインストール要件】

↓まず、修正前の値を確認。必要なものだけ値を変更する。

[root@db02eth0 ~]# /sbin/sysctl -a | grep sem
kernel.sem = 250        32000   32      128
[root@db02eth0 ~]# /sbin/sysctl -a | grep shm
vm.hugetlb_shm_group = 0
kernel.shmmni = 4096
kernel.shmall = 268435456
kernel.shmmax = 4294967295
[root@db02eth0 ~]# /sbin/sysctl -a | grep file-max
fs.file-max = 780841
[root@db02eth0 ~]# /sbin/sysctl -a | grep aio-max
fs.aio-max-nr = 65536
[root@db02eth0 ~]#
[root@db02eth0 ~]# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 32768    61000
[root@db02eth0 ~]# /sbin/sysctl -a | grep net.core.rmem
net.core.rmem_default = 110592
net.core.rmem_max = 131071
[root@db02eth0 ~]# /sbin/sysctl -a | grep net.core.wmem
net.core.wmem_default = 110592
net.core.wmem_max = 131071
[root@db02eth0 ~]#
[root@db02eth0 ~]#
[root@db02eth0 ~]# vi /etc/sysctl.conf
[root@db02eth0 ~]# cat /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

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# 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
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456

#for Oracle11gR1 RAC
#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
#fs.file-max = 65536
fs.aio-max-nr=1048576
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 4194304
[root@db02eth0 ~]#

↑"#for Oracle11gR1 RAC"以下が付け加えた行。


【NFSマウントオプションをOracleClusterwareインストールマニュアルに従い修正】

[oracle@db01eth0 ~]$ df -kh
Filesystem          サイズ  使用  残り 使用% マウント位置
/dev/mapper/VolGroup00-LogVol00
                      130G  3.9G  120G   4% /
/dev/sda1              99M   30M   65M  32% /boot
tmpfs                 4.0G     0  4.0G   0% /dev/shm
192.168.131.3:/nfs    458G  168M  458G   1% /mnt/nfs
[oracle@db01eth0 ~]$
[oracle@db01eth0 ~]$
[oracle@db01eth0 ~]$ su -
パスワード:
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# cat /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
192.168.131.3:/nfs      /mnt/nfs                nfs     rw,intr         0 0
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# nfsstat -m
/mnt/nfs from 192.168.131.3:/nfs
 Flags: rw,vers=3,rsize=8192,wsize=8192,
hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.131.3

[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# vi /etc/fstab
[root@db01eth0 ~]# cat /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
192.168.131.3:/nfs      /mnt/nfs                nfs     rw,rsize=32768,wsize=32768,hard,intr,noac  0 0
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# nfsstat -m
/mnt/nfs from 192.168.131.3:/nfs
 Flags: rw,sync,vers=3,rsize=8192,wsize=8192,
acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,
hard,intr,noac,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.131.3

[root@db01eth0 ~]#

↑NFSver3なのにrsize、wsize(NASデバイスの読み取り&書込みに使用するバイト数)が32kになってない。。NASの性能上の問題か。8kで我慢することに。


【NFS上に「ASM用のNULL埋めファイル」「RACのOCRファイル用ファイル」「RACの投票ディスク用ファイル」作成】

[root@db01eth0 ~]# mkdir /mnt/nfs/asm
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/asm/disk1 bs=1024k count=20000
20000+0 records in
20000+0 records out
20971520000 bytes (21 GB) copied, 2491.76 seconds, 8.4 MB/s
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/asm/disk2 bs=1024k count=20000
20000+0 records in
20000+0 records out
20971520000 bytes (21 GB) copied, 2521.11 seconds, 8.3 MB/s
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# ls -l /mnt/nfs/asm
合計 40963392
-rw-r--r-- 1 root root 20971520000 12月 26 23:17 disk1
-rw-r--r-- 1 root root 20971520000 12月 26 23:59 disk2
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# chown -R oracle:dba /mnt/nfs/asm
[root@db01eth0 ~]# chmod -R 660 /mnt/nfs/asm
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# mkdir /mnt/nfs/ocr
[root@db01eth0 ~]# mkdir /mnt/nfs/votingdisk
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/ocr/ocr1 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 116.87 seconds, 9.0 MB/s
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/ocr/ocr2 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 116.499 seconds, 9.0 MB/s
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/votingdisk/votingdisk1 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 115.43 seconds, 9.1 MB/s
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/votingdisk/votingdisk2 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 115.886 seconds, 9.0 MB/s
[root@db01eth0 ~]# dd if=/dev/zero of=/mnt/nfs/votingdisk/votingdisk3 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 115.901 seconds, 9.0 MB/s
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# chown -R oracle:dba /mnt/nfs/ocr
[root@db01eth0 ~]# chmod -R 640 /mnt/nfs/ocr
[root@db01eth0 ~]# chown -R root:dba /mnt/nfs/votingdisk
[root@db01eth0 ~]# chmod -R 640 /mnt/nfs/votingdisk
[root@db01eth0 ~]#
[root@db01eth0 ~]#
[root@db01eth0 ~]# ls -l /mnt/nfs/asm
合計 40963392
-rw-rw---- 1 oracle dba 20971520000 12月 26 23:17 disk1
-rw-rw---- 1 oracle dba 20971520000 12月 26 23:59 disk2
[root@db01eth0 ~]# ls -l /mnt/nfs/ocr
合計 2048200
-rw-r----- 1 oracle dba 1048576000 12月 27 00:58 ocr1
-rw-r----- 1 oracle dba 1048576000 12月 27 01:00 ocr2
[root@db01eth0 ~]# ls -l /mnt/nfs/votingdisk
合計 3072020
-rw-r----- 1 root dba 1048576000 12月 27 01:03 votingdisk1
-rw-r----- 1 root dba 1048576000 12月 27 01:05 votingdisk2
-rw-r----- 1 root dba 1048576000 12月 27 01:08 votingdisk3
[root@db01eth0 ~]#

↑NAS上に20GBのファイルを作るのに約40分かかってる。

↑votingdisk(投票ディスク)の所有権は後でoracleに変更した。
カレンダー
05 2025/06 07
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
最新コメント
最新トラックバック
プロフィール
HN:
fool
性別:
男性
職業:
会社員
自己紹介:
・国内現物&信用取引の株式のみ。
----------
・株を始めた日:2001/03/16
・〜2004年:収支が±20万の間を動いただけ。
・2005年1月より本を購入する等して再スタート。
・2005年5月よりブックビルディングに参加。
・2009年夏、トータルでマイナスになり、休止。
・過程に満足せず、結果を出すことが目標。
バーコード
ブログ内検索
"fool" WROTE ALL ARTICLES.
PRODUCED BY SHINOBI.JP @ SAMURAI FACTORY INC.
忍者ブログ [PR]