28 June 2011

ASM Administration

Download ASM from Oracle.

Install ASM using Asmlib:


[root@eprax01 asm]# uname -a
Linux eprax01 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:39:47 EDT 2008 i686 i686 i386 GNU/Linux
[root@eprax01 asm]# rpm -Uvh oracleasmlib-2.0.4-1.el4.i386.rpm \
> oracleasm-support-2.1.3-1.el4.i386.rpm \
> oracleasm-2.6.9-78.ELsmp-2.0.5-1.el4.i686.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-78.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
[root@eprax01 asm]#


Configure ASM

[root@eprax01 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]

Create ASM Disks

[root@eprax01 ~]# /etc/init.d/oracleasm createdisk DATA01 /dev/sdc1
Marking disk "DATA01" as an ASM disk: [ OK ]
[root@eprax01 ~]# /etc/init.d/oracleasm createdisk DATA02 /dev/sdb1
Marking disk "DATA02" as an ASM disk: [ OK ]
[root@eprax01 ~]# /etc/init.d/oracleasm listdisks
DATA01
DATA02


The initialization parameters that are of specific interest for an ASM instance are:




INSTANCE_TYPE - Set to ASM or RDBMS depending on the instance type. The default is RDBMS.

DB_UNIQUE_NAME - Specifies a globally unique name for the database. This defaults to +ASM but must be altered if you intend to run multiple ASM instances.

ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instance. The valid values range from 1 to 11, with 1 being the default. The higher the limit the more resources are allocated resulting in faster rebalancing operations. This value is also used as the default when the POWER clause is omitted from a rebalance operation.

ASM_DISKGROUPS - The list of disk groups that should be mounted by an ASM instance during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM configuration changes are automatically reflected in this parameter.

ASM_DISKSTRING - Specifies a value that can be used to limit the disks considered for discovery. Altering the default value may improve the speed of disk group mount time and the speed of adding a disk to a disk group. Changing the parameter to a value which prevents the discovery of already mounted disks results in an error. The default value is NULL allowing all suitable disks to be considered.

SQL> sho parameter ASM_DISKSTRING




NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

asm_diskstring string


SQL> sho parameter ASM_POWER_LIMIT




NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

asm_power_limit integer 1

SQL> select group_number,state,name,total_mb from v$asm_disk;



GROUP_NUMBER STATE NAME TOTAL_MB

------------ -------- ------------------------------ ----------

1 NORMAL DATA01 2047

1 NORMAL DATA02 4094

 
 

 

22 June 2011

Change OBIEE(10.1.3.4) port numbers

To change the installed OBIEE port number 9704 to 80

Before making any changes backup the files

1. Open the file named default-web-site.xml in OracleBI\oc4j_bi\j2ee\home\config and change the port value

2. Change the port in OracleBI\oc4j_bi\j2ee\home\applications\bioffice\bioffice\WEB-INF\bioffice.xml file

3. Change the port in OracleBI\xmlp\XMLP\Admin\Configuration\xmlp-server-config.xml

4. Change the port in OracleBIData\web\config\instanceconfig.xml

Linux Stuff

Steps to add VIP in linux

1. cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
2. nano /etc/sysconfig/network-scripts/ifcfg-eth0:0
3. Change DEVICE=eth0:0
IPADDR=new address
4. /etc/init.d/network restart

Steps to add swap file in linux

You need to use dd command to create swapfile. Next you need to use mkswap command to set up a Linux swap area on a device or in a file.

a) Login as the root user

b) Type following command to create 512MB swap file (1024 * 512MB = 524288 block size):
# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288

c) Set up a Linux swap area:
# mkswap /swapfile1

d) Activate /swapfile1 swap space immediately:
# swapon /swapfile1

e) To activate /swapfile1 after Linux system reboot, add entry to /etc/fstab file. Open this file using text editor such as vi:
# vi /etc/fstab

Append following line:
/swapfile1 swap swap defaults 0 0

So next time Linux comes up after reboot, it enables the new swap file for you automatically.

g) How do I verify swap is activated or not?
Simply use free command:
$ free -m


Find out OS version and whether it's running 32 bit / 64 bit on Solaris.


$ uname -a
SunOS madds6002 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V490
$ isalist
sparcv9+vis2 sparcv9+vis sparcv9 sparcv8plus+vis2 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
$

Delete non match pattern:

ls | grep -v *.zip | xargs -n1 -IREPLACE rm -rf REPLACE

Identify which process is writing to a log file:

lsof | grep path/to/log

17 June 2011

Install 11gR2 RAC on RHEL -- PART6

Install Oracle Database

[oracle@rac1 database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB. Actual 595 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1026 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-06-13_10-49-27AM. Please wait ...




Click Next




Click Next

If you choose Desktop class then we can install only single instance for demonstration purposes.
Hence choose Server class




Choose RAC option and select the RAC nodes that are part of our cluster.



Click next

I have chosen typical install option



click next

Choose the install directory for the database software:




Click Next










There may be errors related to memory, click ignoreall option

Click Finish



Check the status and make sure that there aren't any error in between.



You may encounter the below issues:

1.

In this case, set the Oracle_home as Grid Infra Home and then use "netca" to configure the listener, make sure to use the name as "LISTENER" only; any other name used will stop the installation at the same point.


2. AttachHome failed on node2:

Run the attach home command separately on NODE2:

$/u01/app/oracle/product/11.2.0/prd/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/oracle/product/11.2.0/prd ORACLE_HOME_NAME=OraDb11g_home2 CLUSTER_NODES=rac1,rac2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=rac2

The inventory is located at /u01/app/oraInventory
Please execute the 'null' script at the end of the session.
'AttachHome' was successful.

If the creation of database still fails, use DBCA to configure database.

Install 11gR2 RAC on RHEL -- PART5

Click next, chose Oracle directories for the GRID INFRA HOME




click next to navigate to the pre req screen.





After the installation run the scripts as root user



Run the root.sh as root on rac1 and rac2

[root@rac1 ~]# cd /u01/app/oraInventory/
[root@rac1 oraInventory]# ls
ContentsXML logs oraInst.loc oui
install.platform oraInstaller.properties orainstRoot.sh
[root@rac1 oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.


[root@rac1 grid]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-06-09 14:58:18: Parsing the host name
2011-06-09 14:58:18: Checking for super user privileges
2011-06-09 14:58:18: User has super user privileges
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
root wallet
root wallet cert
root cert export
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1' succeeded

ASM created and started successfully.

DiskGroup ALLDGRP created successfully.


clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 68655560f1f54f0abf42dba1b8e878a3.
Successful addition of voting disk 55b9f92f4a6e4f13bf3cc89ba6e63bc6.
Successful addition of voting disk 8b9af8862b4b4f08bf2399a6ddef7186.
Successfully replaced voting disk group with +ALLDGRP.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 68655560f1f54f0abf42dba1b8e878a3 (ORCL:VOL1) [ALLDGRP]
2. ONLINE 55b9f92f4a6e4f13bf3cc89ba6e63bc6 (ORCL:VOL2) [ALLDGRP]
3. ONLINE 8b9af8862b4b4f08bf2399a6ddef7186 (ORCL:VOL3) [ALLDGRP]
Located 3 voting disk(s).





Run the same on RAC2

[root@rac2 grid]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-06-09 15:21:01: Parsing the host name
2011-06-09 15:21:01: Checking for super user privileges
2011-06-09 15:21:01: User has super user privileges
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting




CRS Daemons running confirmation of Rac1 and Rac2

[root@rac1 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is onlinehttp://www.blogger.com/img/blank.gif
[root@rac1 bin]#


[root@rac2 ~]# cd /u01/app/11.2.0/grid/bin
[root@rac2 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online


Continuation in Part6

Install 11gR2 RAC on RHEL -- PART3

Add extra network card

Press Ctrl + D on your main screen and click Add button as shown below:




Click Next and Finish




We need to make sure these disks are accessed from all the nodes in the cluster(which we will add). To achieve this: After all the disks are added, edit the virtual m/c config(.VMX) file (In my case D:\RACSETUP11g\Node1\ VijuRac1.vmdk) and add the settings in BOLD by editing with Notepad.


config.version = "8"
virtualHW.version = "6"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "1004"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Red Hat Enterprise Linux 5.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "H:\RHEL5\dvd.iso"
ide1:0.deviceType = "cdrom-image"
floppy0.autodetect = "TRUE"
ethernet0.present = "TRUE"
ethernet0.wakeOnPcktRcv = "FALSE"
usb.present = "TRUE"
ehci.present = "TRUE"
sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"
svga.autodetect = "TRUE"
pciBridge0.present = "TRUE"
mks.keyboardFilter = "allow"
displayName = "Red Hat Enterprise Linux 5"
guestOS = "rhel5"
nvram = "Red Hat Enterprise Linux 5.nvram"
deploymentPlatform = "windows"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "useGlobal"

ide1:0.autodetect = "FALSE"
floppy0.fileName = "A:"

isolation.tools.hgfs.disable = "TRUE"

ethernet0.addressType = "generated"
uuid.location = "56 4d 99 94 d7 86 4d ef-38 c5 9f db 38 20 52 4d"
uuid.bios = "56 4d 99 94 d7 86 4d ef-38 c5 9f db 38 20 52 4d"
scsi0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
scsi0.pciSlotNumber = "16"
ethernet0.pciSlotNumber = "32"
sound.pciSlotNumber = "33"
ehci.pciSlotNumber = "34"
ethernet0.generatedAddress = "00:0c:29:20:52:4d"
ethernet0.generatedAddressOffset = "0"
floppy0.startConnected = "FALSE"

ide1:0.startConnected = "TRUE"
tools.syncTime = "FALSE"
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "0"
scsi0.sharedBus = "virtual"


extendedConfigFile = "VijuRac1.vmxf"

scsi0:1.present = "TRUE"
scsi0:1.fileName = "shared01.vmdk"

ethernet1.present = "TRUE"
ethernet1.connectionType = "hostonly"
ethernet1.wakeOnPcktRcv = "FALSE"

scsi0:1.mode = "independent-persistent"
scsi0:1.deviceType = "disk"

scsi0:2.present = "TRUE"
scsi0:2.fileName = "shared02.vmdk"
scsi0:2.mode = "independent-persistent"
scsi0:2.deviceType = "disk"

scsi0:3.present = "TRUE"
scsi0:3.fileName = "shared03.vmdk"
scsi0:3.mode = "independent-persistent"
scsi0:3.deviceType = "disk"

scsi0:4.present = "TRUE"
scsi0:4.fileName = "ocr.vmdk"
scsi0:4.mode = "independent-persistent"
scsi0:4.deviceType = "disk"

scsi0:5.present = "TRUE"
scsi0:5.fileName = "vdisk.vmdk"
scsi0:5.mode = "independent-persistent"
scsi0:5.deviceType = "disk"



Login to the OS as root user

Create Disk partitions for the shared disks:

Perform the below activity on all the partitions.



[root@rac1 ~]# fdisk /dev/sde

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-307, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-307, default 307):
Using default value 307

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.




Change the network parameters:

Add the following in /etc/sysctl.conf

kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
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
Run the following for the kernel parameters to take effect.

/sbin/sysctl -p



Change the Hosts file to add the ip address:

127.0.0.1 localhost.localdomain localhost
# Public
192.168.1.150 rac1.asteroid.com rac1
192.168.1.200 rac2.asteroid.com rac2
#Private
192.168.2.150 rac1-priv.asteroid.com rac1-priv
192.168.2.200 rac2-priv.asteroid.com rac2-priv
#Virtual
192.168.1.100 rac1-vip.asteroid.com rac1-vip
192.168.1.100 rac2-vip.asteroid.com rac2-vip

Create Groups and Users:
# groupadd -g 501 oinstall
# groupadd -g 502 dba
# useradd -g oinstall -G dba oracle
# passwd oracle

Create oracle directories:
[root@rac1 ~]# mkdir -p /u01/app/oracle/product/11.2.0/crs
[root@rac1 ~]# mkdir /u01/app/oracle/product/11.2.0/db_1
[root@rac1 ~]# mkdir /u01/Stage11g
[root@rac1 ~]# chown -R oracle:oinstall /u01/app
[root@rac1 ~]# chown oracle:oinstall /u01/Stage11g
[root@rac1 ~]#

Set the shell limits for oracle user
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Add the following as the second last lines in the /etc/pam.d/login file if it does not exist:
session required pam_limits.so

Append the following to the /etc/profile file:
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi


Download ASM libraries:

http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

Install ASM libraries:

[root@rac1 asm]# rpm -Uvh oracleasm-2.6.18-53.el5-2.0.4-1.el5.i686.rpm \
> oracleasmlib-2.0.4-1.el5.i386.rpm \
> oracleasm-support-2.1.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
warning: oracleasm-support-2.1.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.18-53.el5########################################### [ 67%]
3:oracleasmlib ########################################### [100%]



Configure ASM:

[root@rac1 asm]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]


Create ASM DISKS:

[root@rac1 asm]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@rac1 asm]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@rac1 asm]# /etc/init.d/oracleasm createdisk VOL3 /dev/sde1
Marking disk "VOL3" as an ASM disk: [ OK ]
[root@rac1 asm]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdf1
Marking disk "VOL4" as an ASM disk: [ OK ]


[root@rac1 asm]# /etc/init.d/oracleasm listdisks
VOL1http://www.blogger.com/img/blank.gif
VOL2
VOL3
VOL4
[root@rac1 asm]#




Clone the node RAC1 to RAC2
i.e copy the folder RAC1 in the windows to RAC2...

Continuation in Part4

Install 11gR2 RAC on RHEL -- PART4

Clone RAC1 to RAC2
Change the display name to rac2 in VMX file.

Make sure IP address is changed in RAC2 and both the nodes can communicate with each other.

[root@rac2 ~]# ping rac1
PING rac1.asteroid.com (192.168.1.150) 56(84) bytes of data.
64 bytes from rac1.asteroid.com (192.168.1.150): icmp_seq=1 ttl=64 time=15.0 ms
64 bytes from rac1.asteroid.com (192.168.1.150): icmp_seq=2 ttl=64 time=0.573 ms
64 bytes from rac1.asteroid.com (192.168.1.150): icmp_seq=3 ttl=64 time=1.80 ms

--- rac1.asteroid.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.573/5.798/15.018/6.538 ms
[root@rac2 ~]# ping rac1-priv
PING rac1-priv.asteroid.com (192.168.2.150) 56(84) bytes of data.
64 bytes from rac1-priv.asteroid.com (192.168.2.150): icmp_seq=1 ttl=64 time=0.383 ms
64 bytes from rac1-priv.asteroid.com (192.168.2.150): icmp_seq=2 ttl=64 time=1.55 ms
64 bytes from rac1-priv.asteroid.com (192.168.2.150): icmp_seq=3 ttl=64 time=0.860 ms

--- rac1-priv.asteroid.com ping statistics ---



Setup User Equivalency
Perform this on both the nodes:

[oracle@rac1 .ssh]$ /usr/bin/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:
23:88:ba:0c:37:42:82:21:d6:57:24:ab:41:d4:c4:ce oracle@rac1
[oracle@rac1 .ssh]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
2c:85:7b:ea:f3:29:d8:54:28:d2:b2:88:b5:35:67:b1 oracle@rac1
[oracle@rac1 .ssh]$

Move node1.pub to rac2

Peform below on rac2

[oracle@rac2 .ssh]$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub node1.pub node2.pub
[oracle@rac2 .ssh]$ cat node1.pub node2.pub > authorized_keys
[oracle@rac2 .ssh]$ chmod 644 authorized_keys
[oracle@rac2 .ssh]$ scp authorized_keys rac1:/home/oracle/.ssh
The authenticity of host 'rac1 (192.168.1.150)' can't be established.
RSA key fingerprint is f0:d1:e2:09:0b:b4:45:d3:94:10:2d:85:42:0d:82:b1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.150' (RSA) to the list of known hosts.
oracle@rac1's password:
authorized_keys 100% 1988 1.9KB/ss 00:00
[oracle@rac2 .ssh]$ ssh rac1 date
Wed Jun 8 23:27:23 IST 2011
[oracle@rac2 .ssh]$ ssh rac1-priv date
The authenticity of host 'rac1-priv (192.168.2.150)' can't be established.
RSA key fingerprint is f0:d1:e2:09:0b:b4:45:d3:94:10:2d:85:42:0d:82:b1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1-priv,192.168.2.150' (RSA) to the list of known hosts.
Wed Jun 8 23:28:00 IST 2011
[oracle@rac2 .ssh]$


Download and Install Clusterware:

Install cvuqdisks package located in clusterware’s rpm dir.
This is needed for Cluster Verification Utility to detect shared disks.


[root@rac1 rpm]# rpm -i cvuqdisk-1.0.7-1.rpm
Using default group oinstall to install package
Run the Pre CVU:
[oracle@rac1 cluster]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2


Performing pre-checks for cluster services setup

Checking node reachability...
Node reachability check passed from node "rac1"


Checking user equivalence...
User equivalence check passed for user "oracle"

Checking node connectivity...

Checking hosts config file...

Verification of the hosts config file successful

Node connectivity passed for subnet "192.168.1.0" with node(s) rac2,rac1
TCP connectivity check passed for subnet "192.168.1.0"

Node connectivity passed for subnet "192.168.2.0" with node(s) rac2,rac1
TCP connectivity check passed for subnet "192.168.2.0"


Interfaces found on subnet "192.168.1.0" that are likely candidates for VIP are:
rac2 eth0:192.168.1.200
rac1 eth0:192.168.1.150

Interfaces found on subnet "192.168.2.0" that are likely candidates for a private interconnect are:
rac2 eth1:192.168.2.200
rac1 eth1:192.168.2.150

Node connectivity check passed

Total memory check failed
Check failed on nodes:
rac2,rac1
Available memory check passed
Swap space check failed
Free disk space check failed for "rac2:/tmp"
Check failed on nodes:
rac2
Free disk space check failed for "rac1:/tmp"
Check failed on nodes:
rac1
User existence check passed for "oracle"
Group existence check passed for "oinstall"
Group existence check passed for "dba"
Membership check for user "oracle" in group "oinstall" [as Primary] passed
Membership check for user "oracle" in group "dba" passed
Run level check passed
Hard limits check passed for "maximum open file descriptors"
Soft limits check passed for "maximum open file descriptors"
Hard limits check passed for "maximum user processes"
Soft limits check passed for "maximum user processes"
System architecture check passed
Kernel version check passed
Kernel parameter check passed for "semmsl"
Kernel parameter check passed for "semmns"
Kernel parameter check passed for "semopm"
Kernel parameter check passed for "semmni"
Kernel parameter check passed for "shmmax"
Kernel parameter check passed for "shmmni"
Kernel parameter check passed for "shmall"
Kernel parameter check passed for "file-max"
Kernel parameter check passed for "ip_local_port_range"
Kernel parameter check passed for "rmem_default"
Kernel parameter check passed for "rmem_max"
Kernel parameter check passed for "wmem_default"
Kernel parameter check passed for "wmem_max"
Kernel parameter check passed for "aio-max-nr"
Package existence check passed for "make-3.81"
Package existence check passed for "binutils-2.17.50.0.6"
Package existence check passed for "gcc-4.1.2"
Package existence check passed for "gcc-c++-4.1.2"
Package existence check passed for "libgomp-4.1.2"
Package existence check passed for "libaio-0.3.106"
Package existence check failed for "glibc-2.5-24"
Check failed on nodes:
rac2,rac1
Package existence check passed for "compat-libstdc++-33-3.2.3"
Package existence check passed for "elfutils-libelf-0.125"
Package existence check passed for "elfutils-libelf-devel-0.125"
Package existence check passed for "glibc-common-2.5"
Package existence check passed for "glibc-devel-2.5"
Package existence check passed for "glibc-headers-2.5"
Package existence check passed for "libaio-devel-0.3.106"
Package existence check passed for "libgcc-4.1.2"
Package existence check passed for "libstdc++-4.1.2"
Package existence check passed for "libstdc++-devel-4.1.2"
Package existence check failed for "sysstat-7.0.2"
Check failed on nodes:
rac2,rac1
Package existence check passed for "unixODBC-2.2.11"
Package existence check passed for "unixODBC-devel-2.2.11"
Package existence check passed for "ksh-20060214"
Check for multiple users with UID value 0 passed
Current group ID check passed
Core file name pattern consistency check passed.

User "oracle" is not part of "root" group. Check passed
Default user file creation mask check passed


Start the installation, mount CD or get to the /mnt/hgfs/crs
[oracle@rac1 cluster]$ ./runInstaller



Click Next
Select english and click next





Enter scan name in the /etc/hosts as shown below
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
# Public
192.168.1.150 rac1.asteroid.com rac1
192.168.1.200 rac2.asteroid.com rac2

#Virtual
192.168.1.100 rac1-vip.asteroid.com rac1-vip
192.168.1.300 rac2-vip.asteroid.com rac2-vip

#Private
192.168.2.150 rac1-priv.asteroid.com rac1-priv
192.168.2.200 rac2-priv.asteroid.com rac2-priv

#SCAN
192.168.1.111 rac1-scan.asteroid.com rac1-scan
::1 localhost6.localdomain6 localhost6


What is a SCAN name ?

Oracle introduced this new concept on 11gR2 version: it stands for Single Client Access Name (SCAN). Its purpose is to eliminate the need to change tns name entry when nodes are added to or removed from the Cluster. What does it happen when you have several client and you decide to add/remove a node? So you have to configure your SCAN name




enter scan name as either rac1 or rac2(basically it should be one of the nodes of the cluster and click on Configure GNS



Click next




Click add button and add the second node




click next


Click Next






Click Next


select ASM



Enter the Disk group name and the candidate disks needed for discovery path






Click next



select the appropriate passwords for SYSASM user.





click next, DO NOT CHOOSE THE FAILURE ISOLATION OPTION FOR THIS INSTALL PURPOSE




Click next




Click next, you may get warning message depending the complexity of the password chosen.
http://www.blogger.com/img/blank.gif
Continue with warning message






continuation in Part5

Install 11gR2 RAC on RHEL -- PART2

Once vmware script completes, you will get the message below:




Once done, configure vmware tools to start on boot time.

Follow the link below:






Logout and Login Back as Root

Maintain Time synchronization between Host and vmware OS.



Add the line to the vmware config file.
tools.syncTime = “TRUE”


Edit /boot/grub/grub.conf and add the following options to the kernel /boot/ line of your default (SMP) kernel:
clock=pit nosmp noapic nolapic



Create Virtual Disk and add the below storage disks.

Click Ctrl+D on the vmware workstation screen

Launch the New Hardware Wizard again to add the following SCSI disks:




Launch the New Hardware Wizard again to add the following SCSI disks:

TABLE:

Purpose Size Virtual device node
Database files 3Gb SCSI 0:1
Database files 3Gb SCSI 0:2
Database files 3Gb SCSI 0:3
OCR 300Mb SCSI 0:4
Voting Disk 300Mb SCSI 0:5





Click Next.




Select SCSi




Click Next and save it as shared01.vmdk


Click on advanced button and make sure Independent and persistent device

Repeat the above steps until you have completed all the storage disks shown in the above table.


We need Shared disk for storing Oracle clusterware software and RAC softwarhttp://www.blogger.com/img/blank.gife.
Save the “disks” in the directory where the Node1 resides and click finish.
You should see the recently added shared disks with node 1 as shown below.





Continuation in Part3

06 June 2011

Install 11gR2 RAC on RHEL -- PART1

1. Install VMWARE WORK STATION and setup linux RHEL 5.

If you need help on how to install vmware please clickhttp://www.blogger.com/img/blank.gif here







Manually partition disk drives



Set the size as shown below(Depends on what you want)



Assign IP















Install VMWARE TOOLS:




Continuation in Part2