Wednesday, June 13, 2012

10gR1 RAC installation on OEL4 and using Openfiler-II

Oracle 10gR1 RAC installation on Vmware using Openfiler-II Operating System Oracle Enterprise Linux 4 (OEL4)




This is a 2 node rac installation with third node used as a storage.



Check for the following Redhat Packages Installed or not if any is missing Installed them using the command

rpm -ivh



rpm -qa grep setarch-1.6-1

rpm -qa grep compat-libstdc++-33-3.2.3-47.3

rpm -qa grep make-3.80-7.EL4

rpm -qa grep glibc-2.3.4-2.43

rpm -qa grep openmotif-2.2.3-10.5.el4

rpm -qa grep compat-db-4.1.25-9

rpm -qa grep kernel-2.6.9-89.0.0.0.1.EL

rpm -qa grep glibc-kernheaders-2.4-9.1.103.EL

rpm -qa grep glibc-headers-2.3.4-2.43

rpm -qa grep glibc-devel-2.3.4-2.43

rpm -qa grep gcc-3.4.6-11.0.1

rpm -qa grep libaio-0.3.105-2

rpm -qa grep compat-gcc-32-3.2.3-47.3

rpm -qa grep compat-gcc-32-c++-3.2.3-47.3

rpm -qa grep openmotif21-2.1.30-11.0.1.RHEL4.6

rpm -qa grep sysstat-5.0.5-25.el4

rpm -qa grep rsh-0.17-25.4



Installed these 4 extra RPMs for the RAC to work fine.



rpm -ivh compat-gcc-7.3-2.96.128.i386.rpm

rpm -ivh --force compat-libstdc++-7.3-2.96.128.i386.rpm

rpm -ivh --force compat-libstdc++-devel-7.3-2.96.128.i386.rpm

rpm -ivh compat-gcc-c++-7.3-2.96.128.i386.rpm



Run the following commands as it is they will make changes to sysctl.conf, modprobe.conf, limits.conf, pam.d/login, hosts files, with this it will make some groups and user required for installation. And will create directory structures required for the clusterware and oracle home and database.



echo "kernel.shmall = 2097152" >> /etc/sysctl.conf

echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf

echo "kernel.shmmni = 4096" >> /etc/sysctl.conf

echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf

echo "fs.file-max = 65536" >> /etc/sysctl.conf

echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf

echo "net.core.rmem_default = 1048576" >> /etc/sysctl.conf

echo "net.core.rmem_max = 1048576" >> /etc/sysctl.conf

echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf

echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf

/sbin/sysctl -p

echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modprobe.conf

echo "* soft nproc 2047" >> /etc/security/limits.conf

echo "* hard nproc 16384" >> /etc/security/limits.conf

echo "* soft nofile 1024" >> /etc/security/limits.conf

echo "* hard nofile 65536" >> /etc/security/limits.conf

echo "session required pam_limits.so" >> /etc/pam.d/login

echo "127.0.0.1 localhost" >> /etc/hosts

echo "192.168.0.10 rac1 rac1" >> /etc/hosts

echo "192.168.0.11 rac2 rac2 " >> /etc/hosts

echo "192.168.2.10 rac1-priv rac1-priv " >> /etc/hosts

echo "192.168.2.11 rac2-priv rac2-priv " >> /etc/hosts

echo "192.168.0.14 rac1-vip rac1-vip " >> /etc/hosts

echo "192.168.0.15 rac2-vip rac2-vip " >> /etc/hosts

echo "192.168.2.20 nas nas " >> /etc/hosts

groupadd oinstall

groupadd dba

groupadd oper

useradd -u 500 -g oinstall -G dba oracle

mkdir -p /crs/app/oracle/product/crs

mkdir -p /u01/app/oracle/product/10.2.0/db_1

chown -R root:oinstall /crs

chown -R oracle:oinstall /u01

mkdir -p /crsdata

chown -R oracle:dba /crsdata

chmod -R 777 /crs

chmod -R 777 /u01



Run them as it is on the prompt as they will update the bash_profile of the user oracle that will set the environment variables.



echo " export EDITOR=vi " >> /home/oracle/.bash_profile

echo " export ORACLE_SID=test1" >> /home/oracle/.bash_profile

echo " export ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profile

echo "export ORACLE_HOME="'$ORACLE_BASE'"/product/10.2.0/db_1" >> /home/oracle/.bash_profile

echo "export ORA_CRS_HOME=/crs/app/oracle/product/crs" >> /home/oracle/.bash_profile

echo "export LD_LIBRARY_PATH="'$ORACLE_HOME'"/lib" >> /home/oracle/.bash_profile

echo "export ORACLE_BASE ORACLE_HOME ORACLE_SID ORA_CRS_HOME" >> /home/oracle/.bash_profile

echo "export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/lib:/etc:"'$ORACLE_HOME'"/bin:"'$ORA_CRS_HOME'"/bin:"'$AGENT_HOME'":"'$AGENT_HOME'"/bin:"'$LD_LIBRARY_PATH'":/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:"'$PATH'":." >> /home/oracle/.bash_profile

echo "export PATH" >> /home/oracle/.bash_profile

echo "LD_LIBRARY_PATH=/usr/lib:"'$ORACLE_HOME'"/lib" >> /home/oracle/.bash_profile

echo "export LD_LIBRARY_PATH" >> /home/oracle/.bash_profile

echo "export TNS_ADMIN="'$ORACLE_HOME'"/network/admin" >> /home/oracle/.bash_profile

echo "export "'$TNS_ADMIN'"" >> /home/oracle/.bash_profile

echo "umask 022" >> /home/oracle/.bash_profile

echo "alias sid='echo "'$ORACLE_SID'"'" >> /home/oracle/.bash_profile

echo "alias bash='vi /home/oracle/.bash_profile'" >> /home/oracle/.bash_profile

echo "alias ebash='. /home/oracle/.bash_profile'" >> /home/oracle/.bash_profile

echo "alias pmon='ps -ef
grep pmon'" >> /home/oracle/.bash_profile

echo "alias conn='sqlplus "/ as sysdba"'" >> /home/oracle/.bash_profile

echo "alias cl='clear'" >> /home/oracle/.bash_profile

echo "alias racdb1='export ORACLE_SID=test1;export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1; export CRS_HOME=/crs/app/oracle/product/crs'" >> /home/oracle/.bash_profile



Run this command for the creation of the secure keys.



su - oracle

mkdir /home/oracle/.ssh

chmod 700 /home/oracle/.ssh

cd /home/oracle/.ssh

ssh-keygen -t rsa



Output of the last command (ssh-keygen -t rsa)


Generating public/private rsa key pair.

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/oracle/.ssh/id_rsa.

Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

2a:b9:68:94:94:0c:e2:95:19:e3:d6:da:28:a7:33:2e oracle@rac1.localdomain



Run the following command to copy the secure keys into a file.



[oracle@rac1 .ssh]$ cat *.pub > authorized_keys



Check ON for the following services on the node using the “setup” command



iscsi netfs nfs network nfslock o2cb ocfs2 oracleasm portmap sendmail



Edit the /etc/grub.conf file and make the following changes in one of the file.



kernel /vmlinuz-2.6.9-89.0.0.0.1.ELhugemem ro root=LABEL=/ rhgb quiet

clock=pit nosmp noapic nolapic



Open the /etc/iscsi.conf file and add the ipaddress of the storage machine i.e. openfilerII



[root@rac1 ~]# vi /etc/iscsi.conf



search for DiscoveryAddress in the file and make the following changes,

DiscoveryAddress=192.168.2.20



To see what is inside the keys?



[oracle@rac1 .ssh]$ cat authorized_keys

ssh-dss AAAAB3NzaC1kc3MAAACBAN9rY51El929ShPaI1MBVNBrd6m2XWeZYKrGGek4A0gMbvPG6j+2Firy9ydKFPj3Gat11EZ0SOoxGuUldg8BiB10HANnPlzC9ROAqwx3IkmS1OSKs4QU+aU9A/moNWJQ+MTKqDli9XtwZui6DbOgc/Ug5Nu+IN+Ljeg0fmbkCSrdAAAAFQD+D8JliDEREpvWH1wF5vGPfoWzIQAAAIAQujk9AmNQFAZEzLJJuJuvsiCRIQs0diRFAGl4ugGnPYRcjYQt96z7QlE9gNltKCtNd5a/XQjD7QOCIvYngc3KtiyR7p3I8MCUn58XwKE4eB5EfTh6+Ze+35mqOrQNYUMGiBbUvfFGP0aS/c0mWGEqhxCp0/A/dWv9Ma0lQEWoEwAAAIBrPZRcuakyE7fhiexlc8/Xi88O3Rqw9zdgeLPGlUDPW1HgtncPXACdywPvTPSu8Kc9ixWbYfkdZt4Cxk3McnchAJR5yWT/oQoyNkzS3YwedIJR3/71dhX9w1QXdVtUoVhIahYIeeARwmBPL6TjAJ7PIFtq9N0kFH/blb/z3OZOHA== oracle@rac1

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAu2EnY7rREimf9EQ0B8Sr7DoptCX36hZMpEwLCGS8hrtvzOO/r/OsPFoS6eXZ+eTbgrlnArWSqS9GXsRVr12eZD6EkdCEqp0Hsm3ICyGLbFAVNKMJtbXxqaQKxA1rY4AyJqY5tsu2vVeCGVhl8yTKI9QSAaxcRBnMcwregh8Q9d0= oracle@rac1



[oracle@rac1 ~]$ exit

logout



U HAVE COMPLETED EVERY TASK TO MAKE THE FIRST NODE FOR THE RAC MACHINE.

FOLLOW THE SAME STEPS TO CREATE THE SECOND NODE FOR THE RAC MACHINE IN VMWARE ENVIRONMENT.























Once u have 2 machines ready with u in the VMWARE environment

Run the following commands.



[root@racnode1 ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda3 19G 9.5G 8.3G 54% /

/dev/sda1 99M 18M 77M 19% /boot

none 505M 0 505M 0% /dev/shm

[root@racnode1 ~]#



[oracle@racnode1 cluvfy]$ df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda3 19G 9.7G 8.0G 55% /

/dev/sda1 99M 18M 77M 19% /boot

none 505M 0 505M 0% /dev/shm

/dev/hdc 2.3G 2.3G 0 100% /media/cdrom

/dev/sdb1 7.4G 195M 7.2G 3% /crsdata

[oracle@racnode1 cluvfy]$



[root@racnode1 ~]# iscsi-ls

*******************************************************************************

SFNet iSCSI Driver Version ...4:0.1.11-7(14-Apr-2008)

*******************************************************************************

[root@racnode1 ~]# service iscsi restart

Searching for iscsi-based multipath maps

Found 0 maps

Stopping iscsid: [ OK ]

Removing iscsi driver: [ OK ]

Checking iscsi config: [ OK ]

Loading iscsi driver: [ OK ]

Starting iscsid: [ OK ]













[root@racnode1 ~]# iscsi-ls

*******************************************************************************

SFNet iSCSI Driver Version ...4:0.1.11-7(14-Apr-2008)

*******************************************************************************

TARGET NAME : iqn.2006-01.com.openfiler:cluster

TARGET ALIAS :

HOST ID : 1

BUS ID : 0

TARGET ID : 0

TARGET ADDRESS : 192.168.2.20:3260,1

SESSION STATUS : ESTABLISHED AT Tue Jan 24 23:04:33 IST 2012

SESSION ID : ISID 00023d000001 TSIH 100

*******************************************************************************

[root@racnode1 ~]#



[root@racnode1 ~]# dmesg
grep Attach

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0



[root@racnode1 ~]# fdisk -l



Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes



Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 144 1052257+ 82 Linux swap

/dev/sda3 145 2610 19808145 83 Linux



Disk /dev/sdb: 7918 MB, 7918845952 bytes

244 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 15128 * 512 = 7745536 bytes



Disk /dev/sdb doesn't contain a valid partition table

[root@racnode1 ~]#



[root@racnode1 ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.



Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)



Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1022, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022):

Using default value 1022



Command (m for help): w

The partition table has been altered!



Calling ioctl() to re-read partition table.

Syncing disks.









[root@racnode1 ~]# fdisk -l



Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes



Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 144 1052257+ 82 Linux swap

/dev/sda3 145 2610 19808145 83 Linux



Disk /dev/sdb: 7918 MB, 7918845952 bytes

244 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 15128 * 512 = 7745536 bytes



Device Boot Start End Blocks Id System

/dev/sdb1 1 1022 7730377 83 Linux

[root@racnode1 ~]#



Run the following commands on the Node RAC1



[oracle@rac1 .ssh]$ scp authorized_keys rac2:/home/oracle/.ssh



[oracle@rac1 .ssh]$ ssh rac1 date

The authenticity of host 'rac1 (192.168.0.10)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1,192.168.0.10' (RSA) to the list of known hosts.

Tue Jan 24 22:25:07 IST 2012



[oracle@rac1 .ssh]$ ssh rac2 date

The authenticity of host 'rac2 (192.168.0.11)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2,192.168.0.11' (RSA) to the list of known hosts.

Tue Jan 24 22:25:15 IST 2012



[oracle@rac1 .ssh]$ ssh rac2-priv date

The authenticity of host 'rac2-priv (192.168.2.11)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2-priv,192.168.2.11' (RSA) to the list of known hosts.

Tue Jan 24 22:25:28 IST 2012



[oracle@rac1 .ssh]$ ssh rac1-priv date

The authenticity of host 'rac1-priv (192.168.2.10)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1-priv,192.168.2.10' (RSA) to the list of known hosts.





Run the following commands on the Node RAC2



[oracle@rac1 .ssh]$ cat *.pub >> authorized_keys

[oracle@rac1 .ssh]$ scp authorized_keys rac1:/home/oracle/.ssh



[oracle@rac2 .ssh]$ ssh rac1 date

The authenticity of host 'rac1 (192.168.0.10)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1,192.168.0.10' (RSA) to the list of known hosts.

Tue Jan 24 22:25:07 IST 2012



[oracle@rac2 .ssh]$ ssh rac2 date

The authenticity of host 'rac2 (192.168.0.11)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2,192.168.0.11' (RSA) to the list of known hosts.

Tue Jan 24 22:25:15 IST 2012



[oracle@rac2 .ssh]$ ssh rac2-priv date

The authenticity of host 'rac2-priv (192.168.2.11)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2-priv,192.168.2.11' (RSA) to the list of known hosts.

Tue Jan 24 22:25:28 IST 2012



[oracle@rac2 .ssh]$ ssh rac1-priv date

The authenticity of host 'rac1-priv (192.168.2.10)' can't be established.

RSA key fingerprint is e5:ab:00:c3:86:45:c0:62:4d:a5:e0:67:50:ef:38:3e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1-priv,192.168.2.10' (RSA) to the list of known hosts.



Run the following commands on the Node RAC1

Run the following commands to confirm that two machines can communicate without the key authorization



[oracle@rac1 .ssh]$ ssh rac1-priv date

Tue Jan 24 22:25:43 IST 2012



[oracle@rac1 .ssh]$ ssh rac2-priv date

Tue Jan 24 22:25:46 IST 2012



[oracle@rac1 .ssh]$ ssh rac2 date

Tue Jan 24 22:25:49 IST 2012



[oracle@rac1 .ssh]$ ssh rac1 date

Tue Jan 24 22:25:54 IST 2012



Do the User equivalence



[oracle@rac1 .ssh]$



exec /usr/bin/ssh-agent $SHELL

/usr/bin/ssh-add



[oracle@rac1 .ssh]$

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

[oracle@rac1 .ssh]$





Run the following commands on the Node RAC2

Run the following commands to confirm that two machines can communicate without the key authorization



[oracle@rac2 .ssh]$ ssh rac1-priv date

Tue Jan 24 22:25:43 IST 2012



[oracle@rac2 .ssh]$ ssh rac2-priv date

Tue Jan 24 22:25:46 IST 2012



[oracle@rac2 .ssh]$ ssh rac2 date

Tue Jan 24 22:25:49 IST 2012



[oracle@rac2 .ssh]$ ssh rac1 date

Tue Jan 24 22:25:54 IST 2012



Do the User equivalence



[oracle@rac2 .ssh]$ exec /usr/bin/ssh-agent $SHELL



[oracle@rac2 .ssh]$ /usr/bin/ssh-add

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

[oracle@rac2 .ssh]$



This is how the public keys of both nodes looks like.



[oracle@rac2 .ssh]$ cat authorized_keys

ssh-dss AAAAB3NzaC1kc3MAAACBAN9rY51El929ShPaI1MBVNBrd6m2XWeZYKrGGek4A0gMbvPG6j+2Firy9ydKFPj3Gat11EZ0SOoxGuUldg8BiB10HANnPlzC9ROAqwx3IkmS1OSKs4QU+aU9A/moNWJQ+MTKqDli9XtwZui6DbOgc/Ug5Nu+IN+Ljeg0fmbkCSrdAAAAFQD+D8JliDEREpvWH1wF5vGPfoWzIQAAAIAQujk9AmNQFAZEzLJJuJuvsiCRIQs0diRFAGl4ugGnPYRcjYQt96z7QlE9gNltKCtNd5a/XQjD7QOCIvYngc3KtiyR7p3I8MCUn58XwKE4eB5EfTh6+Ze+35mqOrQNYUMGiBbUvfFGP0aS/c0mWGEqhxCp0/A/dWv9Ma0lQEWoEwAAAIBrPZRcuakyE7fhiexlc8/Xi88O3Rqw9zdgeLPGlUDPW1HgtncPXACdywPvTPSu8Kc9ixWbYfkdZt4Cxk3McnchAJR5yWT/oQoyNkzS3YwedIJR3/71dhX9w1QXdVtUoVhIahYIeeARwmBPL6TjAJ7PIFtq9N0kFH/blb/z3OZOHA== oracle@rac1

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAu2EnY7rREimf9EQ0B8Sr7DoptCX36hZMpEwLCGS8hrtvzOO/r/OsPFoS6eXZ+eTbgrlnArWSqS9GXsRVr12eZD6EkdCEqp0Hsm3ICyGLbFAVNKMJtbXxqaQKxA1rY4AyJqY5tsu2vVeCGVhl8yTKI9QSAaxcRBnMcwregh8Q9d0= oracle@rac1

ssh-dss AAAAB3NzaC1kc3MAAACBAInFN9xBAVkVixaPIz9ot5noEQEkr020uNallupo1N5/Gw/9QtIAp+ekD6nbCVmGAbi1TlMltNJ1ruB4gZrFbjmtptcnAYKhDNlIlh563BeWaQvuikmDNvYyY/e/3u12vcMLlGoJN1zz0LIwxIJIzb+uexKIRt3x592Ot96lplrBAAAAFQCQ1Ij8uNCQvPyjDyZfIZaW7mbvVQAAAIB4Y5WQo7cz36VU9TKiQSjvV2gJ/+4sWduPnDq76qiAkuW7CItzM143Db7nR4sQWCCE11EEvIQ0NF4tO6l0SaYLkrwSKmHyEtUg9qCbUI9ZXfVzluyUF09/fRDqAoQdnNpwZZoB4s58Nm6ucbBhN0cNmYQ8NcUfpdWvfjibigtuLAAAAIA1a+4AQdXKrHSdDp8FajEAa/dAtUDEW7m8wVDZYhu2jyMWLZTPi6zmeSkH72exSCIB/xyUAIs0J5YuN9bjtiSF6wA3T8GZefO37o4rCftXdGhCFsFhrFt0YsfFaEH9O+79EOyW60FQoU4KuvOyyCUQNnigK63eLMR8y59/ZWXU3g== oracle@rac2

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvVwB3UrsOQvQMXGeuHRdb1IoUn1QtTs3xYAYoZTUOk0St3RdJEErDoaR3NosezTQJClhIuMEyzr3xWS611vkPvdYd/eXBe+IU8Ag4mIe6C5JhncPNV7bbPa5SZNtSzijwmvsg0LWcwmzQ1U5UlBELrghGSOG3/FDpOSrhKdGgNM= oracle@rac2

[oracle@rac2 .ssh]$





# listener.ora.racnode1 Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.racnode1

# Generated by Oracle configuration tools.



LISTENER_RACNODE1 =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521)(IP = FIRST))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.10)(PORT = 1521)(IP = FIRST))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))

)

)

)





# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/n etwork/admin/tnsnames.ora

# Generated by Oracle configuration tools.



TEST2 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = test)

(INSTANCE_NAME = test2)

)

)



TEST1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = test)

(INSTANCE_NAME = test1)

)

)



LISTENERS_TEST =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521))

)



TEST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521))

(LOAD_BALANCE = yes)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = test)

)

)







[oracle@racnode2 admin]$ cat listener.ora

# listener.ora.racnode2 Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.racnode2

# Generated by Oracle configuration tools.



LISTENER_RACNODE2 =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521)(IP = FIRST))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521)(IP = FIRST))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))

)

)

)



[oracle@racnode2 admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.



TEST2 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = test)

(INSTANCE_NAME = test2)

)

)



TEST1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = test)

(INSTANCE_NAME = test1)

)

)



LISTENERS_TEST =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521))

)



TEST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode1-vip)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = racnode2-vip)(PORT = 1521))

(LOAD_BALANCE = yes)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = test)

)

)



[oracle@racnode2 admin]$







[root@racnode1 bin]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

BROADCAST=192.168.0.255

HWADDR=00:0C:29:CF:B6:70

IPADDR=192.168.0.10

NETMASK=255.255.255.0

NETWORK=192.168.0.0

ONBOOT=yes

TYPE=Ethernet

USERCTL=no

IPV6INIT=no

PEERDNS=yes

GATEWAY=192.168.0.10

[root@racnode1 bin]# cat /etc/sysconfig/network-scripts/ifcfg-eth1

# Please read /usr/share/doc/initscripts-*/sysconfig.txt

# for the documentation of these parameters.

ONBOOT=yes

USERCTL=no

IPV6INIT=no

PEERDNS=yes

GATEWAY=192.168.2.10

TYPE=Ethernet

DEVICE=eth1

HWADDR=00:0c:29:cf:b6:7a

BOOTPROTO=none

NETMASK=255.255.255.0

IPADDR=192.168.2.10

[root@racnode1 bin]#









[root@racnode1 bin]# chkconfig --list
grep iscsi

iscsi 0:off 1:off 2:off 3:off 4:off 5:on 6:off



[root@racnode1 bin]# chkconfig --list
grep ocfs2

ocfs2 0:off 1:off 2:on 3:on 4:on 5:on 6:off



[root@racnode1 bin]# chkconfig --list
grep o2cb

o2cb 0:off 1:off 2:on 3:on 4:on 5:on 6:off



[root@racnode1 bin]# cat /etc/fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details

LABEL=/ / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

none /dev/pts devpts gid=5,mode=620 0 0

none /dev/shm tmpfs defaults 0 0

none /proc proc defaults 0 0

none /sys sysfs defaults 0 0

LABEL=/u01 /u01 ext3 defaults 1 2

LABEL=SWAP-sda3 swap swap defaults 0 0

/dev/sdb1 /crsdata ocfs2 _netdev,nointr,datavolume 0 0

/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0

/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0



[root@racnode1 bin]# cat /etc/grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/sda2

# initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Enterprise (2.6.9-89.0.0.0.1.ELhugemem)

root (hd0,0)

kernel /vmlinuz-2.6.9-89.0.0.0.1.ELhugemem ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic

initrd /initrd-2.6.9-89.0.0.0.1.ELhugemem.img

title Enterprise-smp (2.6.9-89.0.0.0.1.ELsmp)

root (hd0,0)

kernel /vmlinuz-2.6.9-89.0.0.0.1.ELsmp ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-89.0.0.0.1.ELsmp.img

title Enterprise-xenU (2.6.9-89.0.0.0.1.ELxenU)

root (hd0,0)

kernel /vmlinuz-2.6.9-89.0.0.0.1.ELxenU ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-89.0.0.0.1.ELxenU.img

title Enterprise-up (2.6.9-89.0.0.0.1.EL)

root (hd0,0)

kernel /vmlinuz-2.6.9-89.0.0.0.1.EL ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-89.0.0.0.1.EL.img

[root@racnode1 bin]#





[oracle@racnode1 ~]$ cd /u01/app/oracle/admin/test/pfile/

[oracle@racnode1 pfile]$ ll

total 4

-rw-r----- 1 oracle oinstall 2666 Feb 1 16:51 init.ora.112012165147



[oracle@racnode1 pfile]$ cat init.ora.112012165147

##############################################################################

# Copyright (c) 1991, 2001, 2002 by Oracle Corporation

##############################################################################



db_block_size=8192

db_file_multiblock_read_count=16

cluster_database_instances=2

remote_listener=LISTENERS_TEST

open_cursors=300

db_domain=""

db_name=test

background_dump_dest=/u01/app/oracle/admin/test/bdump

core_dump_dest=/u01/app/oracle/admin/test/cdump

user_dump_dest=/u01/app/oracle/admin/test/udump

control_files=("/crsdata/datafile/test/control01.ctl", "/crsdata/datafile/test/control02.ctl", "/crsdata/datafile/test/control03.ctl")

job_queue_processes=10

compatible=10.2.0.1.0

processes=150

sga_target=285212672

audit_file_dest=/u01/app/oracle/admin/test/adump

remote_login_passwordfile=exclusive

dispatchers="(PROTOCOL=TCP) (SERVICE=testXDB)"

pga_aggregate_target=94371840

undo_management=AUTO

cluster_database=true

test1.instance_number=1

test2.instance_number=2

test2.thread=2

test1.undo_tablespace=UNDOTBS1

test2.undo_tablespace=UNDOTBS2

test1.thread=1

[oracle@racnode1 pfile]$









-rw-r----- 1 oracle oinstall 2666 Feb 1 16:51 init.ora.112012165147

[oracle@racnode2 pfile]$ cat init.ora.112012165147

##############################################################################

# Copyright (c) 1991, 2001, 2002 by Oracle Corporation

##############################################################################

db_block_size=8192

db_file_multiblock_read_count=16

cluster_database_instances=2

remote_listener=LISTENERS_TEST

open_cursors=300

db_domain=""

db_name=test

background_dump_dest=/u01/app/oracle/admin/test/bdump

core_dump_dest=/u01/app/oracle/admin/test/cdump

user_dump_dest=/u01/app/oracle/admin/test/udump

control_files=("/crsdata/datafile/test/control01.ctl", "/crsdata/datafile/test/control02.ctl", "/crsdata/datafile/test/control03.ctl")

job_queue_processes=10

compatible=10.2.0.1.0

processes=150

sga_target=285212672

audit_file_dest=/u01/app/oracle/admin/test/adump

remote_login_passwordfile=exclusive

dispatchers="(PROTOCOL=TCP) (SERVICE=testXDB)"

pga_aggregate_target=94371840

undo_management=AUTO

cluster_database=true

test1.instance_number=1

test2.instance_number=2

test2.thread=2

test1.undo_tablespace=UNDOTBS1

test2.undo_tablespace=UNDOTBS2

test1.thread=1

[oracle@racnode2 pfile]$







[oracle@racnode2 pfile]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/

[oracle@racnode2 dbs]$ cat inittest2.ora

SPFILE='/crsdata/datafile/test/spfiletest.ora'

[oracle@racnode2 dbs]$

[oracle@racnode2 dbs]$







[oracle@racnode2 dbs]$

[oracle@racnode2 dbs]$ cat /crsdata/datafile/test/s

spfiletest.ora sysaux01.dbf system01.dbf

[oracle@racnode2 dbs]$ cat /crsdata/datafile/test/spfiletest.ora

\uffff\uffff($.

test2.__db_cache_size=180355072

test1.__db_cache_size=171966464

test2.__java_pool_size=4194304

test1.__java_pool_size=4194304

test2.__large_pool_size=4194304

test1.__large_pool_size=4194304

test2.__shared_pool_size=92274688

test1.__shared_pool_size=100663296

test2.__streams_pool_size=0

test1.__streams_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/test/adump'

*.background_dump_dest='/u01/app/oracle/admin/test/bdump'

*.cluster_database_instances=2

*.cluster_database=true

*.compatible='10.2.0.1.0'

*.control_files='/crsdata/datafile/test/control01.ctl','/crsdata/datafile/test/control02.ctl','/crsdata/datafile/test/control03.ctl'

*.core_dump_dest='/u01/app/oracle/admin/test/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='test'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=testXDB)'

test1.instance_number=1

test2.instance_number=2

*.job_queue_processes=10

*.open_cursors=300

*.pga_aggregate_target=94371840

*.processes=150

*.remote_listener='LISTENERS_TEST'

*.remote_login_passwordfile='exclusive'

*.sga_target=285212672

test2.thread=2

test1.thread=1

*.undo_management='AUTO'

test1.undo_tablespace='UNDOTBS1'

test2.undo_tablespace='UNDOTBS2'

*.user_dump_dest='/u01/app/oracle/admin/test/udump'

[oracle@racnode2 dbs]$



OPENFILER SETTINGS:

we will open the web browser using https://192.168.2.20:446


username openfile

password password

firstly click on the "system tab" on the first page

then at the end of the page we have

network access configration and we will make the following entries

rac1 192.168.2.10 2555.255.255.255

rac2 192.168.2.11 255.255.255.255

update;

go on volume tab

and bottom of that page

create new physical volume then click on the "edit disk" in the block device management then at the bottom of the page

and click on the "create button" for the primary mode

then again come at the bottom and click on "create button" for the logical mode.....

click on add volume



then in create a new volume group

specify the volume group name as : crsdata and select the check box of physical volume.

and click the button





click on the "services" tab and enable the

iSCSi target server service







then click on "volume" tab then in the volume section click add "add volume"

and make the following entries







in volume name : cluster

volume desc: rac1rac2

required space: 10

filesystem : iscsi

and click on create button







then click in "volume" tab and in the right side in volume section we can click on "iscsi targets"



click on the target configuration and add target IQN

make the entry iqn.2006-01.com.openfiler:cluster click add



then click on lunmapping

and click on map button



then click on access list and allow access to both rac1 and rac2 and click on update button.





now we must get the sdb partition

format it using fdsik /dev/sdb command











now simply logout

/etc/init.d/o2cb configure

Y

enter

enter

enter

enter

enter



ocfs2console



cluster>configure nodes>



rac1

192.168.0.10

7777



rac2

192.168.0.11

7777





service iscsi restart

when we get the iscsi lun



in ocfs2console



task>format



/dev/sdb1(unknown)

crsdata

64k

4

4K





propagate nodes



/etc/init.d/o2cb configure

Y

enter

enter

enter

enter

enter









then click mount in o2cfsconsole

mountpoint /crsdata

options nointr,datavolume,_netdev









df -h

must show the mount point /crsdata







vi /etc/fstab ---------> entry

/dev/sda5 /u01 ext3 defaults 0 0

/dev/sdb1 /crsdata ocfs2 _netdev,nointr,datavolume 0 0









chown -R oracle:dba /crsdata

chmod -R 1777 /crs/app/oracle/product/crs

chmod -R 1777 /u01/app/oracle/product/10.2.0/db_1



chmod -R 1777 /crsdata



bash profile entries for the oracle user



unzip clusteware

run clusvrfy









check for the permissions----->

root oinstall /crs

oracle oinstall /u01

oracle dba /crsdata



cd /crsdata

mkdir main second third









during installing clusterware



crs_home----> /crs/app/oracle/product/crs

add

rac2

rac2-priv

rac2-vip

edit the eth where ip is 192.168.0.0 change it as public





entries for the OCR



/crsdata/main/ocrfile

/crsdata/second/ocrfile



entries for the voting disk



/crsdata/main/votedisk

/crsdata/second/votedisk

/crsdata/third/votedisk



































ERRORS I FACED:



Exception java.lang.UnsatisfiedLinkError: no nio in java.library.path occurred..java.lang.UnsatisfiedLinkError: no nio in java.library.path

The Solution is to point the TMP and TMPDIR environment variables to some directory other than /tmp





[oracle@racnode1 ~]$ srvctl start instance -d test -i test2

/u01/app/oracle/product/10.2.0/db_1/bin/srvctl: line 170: 14767 Segmentation fault $JRE $JRE_OPTIONS -classpath $CLASSPATH $TRACE oracle.ops.opsctl.OPSCTLDriver "$@"

No comments:

Post a Comment

ORA-12519: TNS:no appropriate service handler found error

ORA-12519: TNS: no appropriate service handler found error The real problem lies in the PROCESSES parameter All you need ...