Showing posts with label disk setup. Show all posts
Showing posts with label disk setup. Show all posts

Monday, April 28, 2008

Step by Step 11gR1 RAC CRS Installation

Oracle Global Support strongly recommends that you use Red Hat Enterprise Linux ES/AS 4 (update 3 or higher). This is kernel 2.6.9-34 or greater.

Requried RPMS: (check details on Metalink Note:437123.1)

compat-libstdc++-33-3.2.3.x86_64.rpm
elfutils-libelf-devel-0.97-5.x86_64.rpm
glibc-devel-2.3.4-2.19.x86_64.rpm
glibc-devel-2.3.4-2.19.i386.rpm (32-Bit)
gcc-3.4.5-2.x86_64.rpm
libstdc++-devel-3.4.5-2.x86_64.rpm
gcc-c++-3.4.5-2.x86_64.rpm
libaio-0.3.105-2.x86_64.rpm
libaio-0.3.105-2.i386.rpm (32-Bit)
libaio-devel-0.3.105-2.x86_64.rpm
sysstat-5.0.5-7.rhel4.x86_64.rpm
glibc-headers-2.3.4-2.19.x86_64.rpm
glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm

To query rpm installed in your system:
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep compat-libstdc++

Sample sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

Add the following settings to /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
session required pam_limits.so

Add the following lines to /etc/profile:

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
This is how the /etc/hosts file look like:
[oracle@oradbdev02 ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
127.0.0.1 oradbdev02.xxxx.com oradbdev02
# Public
10.66.81.61 oradbdev01.xxxx.com oradbdev01
10.66.81.62 oradbdev02.xxxx.com oradbdev02
#Private
192.168.0.61 oradbdev01-priv.xxxx.com oradbdev01-priv
192.168.0.62 oradbdev02-priv.xxxx.com oradbdev02-priv
#Virtual
10.66.81.198 oradbdev01-vip.xxxx.com oradbdev01-vip
10.66.81.199 oradbdev02-vip.xxxx.com oradbdev02-vip


Imp metalink notes to look at before installation: 452780.1.

Setup user equivalence between the rac nodes.
Check that oracle is able to ssh between the rac servers without having to type the password.
Setup up location of OCR & Voting disk files. For test purposes I used the same mount point with different folders for each e.g.
/DB01/ocr
/DB01/voting_disk

Now run the cluster verify utility to do a pre-check before the cluster installation.
[oracle@oradbdev01 clusterware]$ ./runcluvfy.sh stage -pre crsinst -n oradbdev01,oradbdev02 -verbose

Performing pre-checks for cluster services setup

Checking node reachability...

Check: Node reachability from node "oradbdev01"
Destination Node Reachable?
------------------------------------ ------------------------
oradbdev01 yes
oradbdev02 yes
Result: Node reachability check passed from node "oradbdev01".


Checking user equivalence...

Check: User equivalence for user "oracle"
Node Name Comment
------------------------------------ ------------------------
oradbdev02 passed
oradbdev01 passed
Result: User equivalence check passed for user "oracle".

Checking administrative privileges...

Check: Existence of user "oracle"
Node Name User Exists Comment
------------ ------------------------ ------------------------
oradbdev02 yes passed
oradbdev01 yes passed
Result: User existence check passed for "oracle".

Check: Existence of group "oinstall"
Node Name Status Group ID
------------ ------------------------ ------------------------
oradbdev02 exists 503
oradbdev01 exists 503
Result: Group existence check passed for "oinstall".

Check: Membership of user "oracle" in group "oinstall" [as Primary]
Node Name User Exists Group Exists User in Group Primary Comment
---------------- ------------ ------------ ------------ ------------ ------------
oradbdev02 yes yes yes no failed
oradbdev01 yes yes yes no failed
Result: Membership check for user "oracle" in group "oinstall" [as Primary] failed.

Administrative privileges check failed.

Checking node connectivity...


Interface information for node "oradbdev02"
Interface Name IP Address Subnet Subnet Gateway Default Gateway Hardware Address
---------------- ------------ ------------ ------------ ------------ ------------
eth0 10.66.81.62 10.66.80.0 0.0.0.0 10.66.80.1 00:1B:78:DF:CC:9C
eth1 192.168.0.62 192.168.0.0 0.0.0.0 10.66.80.1 00:1B:78:DF:CC:84


Interface information for node "oradbdev01"
Interface Name IP Address Subnet Subnet Gateway Default Gateway Hardware Address
---------------- ------------ ------------ ------------ ------------ ------------
eth0 10.66.81.61 10.66.80.0 0.0.0.0 10.66.80.1 00:1B:78:DF:AC:0E
eth1 192.168.0.61 192.168.0.0 0.0.0.0 10.66.80.1 00:1B:78:DF:AC:08


Check: Node connectivity of subnet "10.66.80.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
oradbdev02:eth0 oradbdev01:eth0 yes
Result: Node connectivity check passed for subnet "10.66.80.0" with node(s) oradbdev02,oradbdev01.

Check: Node connectivity of subnet "192.168.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
oradbdev02:eth1 oradbdev01:eth1 yes
Result: Node connectivity check passed for subnet "192.168.0.0" with node(s) oradbdev02,oradbdev01.

Interfaces found on subnet "10.66.80.0" that are likely candidates for VIP:
oradbdev02 eth0:10.66.81.62
oradbdev01 eth0:10.66.81.61

Interfaces found on subnet "192.168.0.0" that are likely candidates for a private interconnect:
oradbdev02 eth1:192.168.0.62
oradbdev01 eth1:192.168.0.61

Result: Node connectivity check passed.


Checking system requirements for 'crs'...

Check: Total memory
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
oradbdev02 7.79GB (8164980KB) 1GB (1048576KB) passed
oradbdev01 7.79GB (8164980KB) 1GB (1048576KB) passed
Result: Total memory check passed.

Check: Free disk space in "/tmp" dir
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
oradbdev02 199.68GB (209378492KB) 400MB (409600KB) passed
oradbdev01 216.94GB (227478076KB) 400MB (409600KB) passed
Result: Free disk space check passed.

Check: Swap space
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
oradbdev02 15.81GB (16579072KB) 1.5GB (1572864KB) passed
oradbdev01 15.8GB (16571036KB) 1.5GB (1572864KB) passed
Result: Swap space check passed.

Check: System architecture
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
oradbdev02 x86_64 x86_64 passed
oradbdev01 x86_64 x86_64 passed
Result: System architecture check passed.

Check: Kernel version
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
oradbdev02 2.6.9-55.ELsmp 2.6.9-11.EL passed
oradbdev01 2.6.9-55.ELsmp 2.6.9-11.EL passed
Result: Kernel version check passed.

Check: Package existence for "make-3.80"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 make-3.80-6.EL4 passed
oradbdev01 make-3.80-6.EL4 passed
Result: Package existence check passed for "make-3.80".

Check: Package existence for "binutils-2.15.92.0.2"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 binutils-2.15.92.0.2-22 passed
oradbdev01 binutils-2.15.92.0.2-22 passed
Result: Package existence check passed for "binutils-2.15.92.0.2".

Check: Package existence for "gcc-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 gcc-3.4.6-9 passed
oradbdev01 gcc-3.4.6-8 passed
Result: Package existence check passed for "gcc-3.4.5".

Check: Package existence for "libaio-0.3.105"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libaio-0.3.105-2 passed
oradbdev01 libaio-0.3.105-2 passed
Result: Package existence check passed for "libaio-0.3.105".

Check: Package existence for "libaio-0.3.105"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libaio-0.3.105-2 passed
oradbdev01 libaio-0.3.105-2 passed
Result: Package existence check passed for "libaio-0.3.105".

Check: Package existence for "libaio-devel-0.3.105"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libaio-devel-0.3.105-2 passed
oradbdev01 libaio-devel-0.3.105-2 passed
Result: Package existence check passed for "libaio-devel-0.3.105".

Check: Package existence for "libstdc++-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libstdc++-3.4.6-9 passed
oradbdev01 libstdc++-3.4.6-8 passed
Result: Package existence check passed for "libstdc++-3.4.5".

Check: Package existence for "libstdc++-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libstdc++-3.4.6-9 passed
oradbdev01 libstdc++-3.4.6-8 passed
Result: Package existence check passed for "libstdc++-3.4.5".

Check: Package existence for "elfutils-libelf-devel-0.97"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 elfutils-libelf-devel-0.97.1-5 passed
oradbdev01 elfutils-libelf-devel-0.97.1-4 passed
Result: Package existence check passed for "elfutils-libelf-devel-0.97".

Check: Package existence for "sysstat-5.0.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 sysstat-5.0.5-16.rhel4 passed
oradbdev01 sysstat-5.0.5-14.rhel4 passed
Result: Package existence check passed for "sysstat-5.0.5".

Check: Package existence for "libgcc-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libgcc-3.4.6-8 passed
oradbdev01 libgcc-3.4.6-8 passed
Result: Package existence check passed for "libgcc-3.4.5".

Check: Package existence for "libgcc-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libgcc-3.4.6-9 passed
oradbdev01 libgcc-3.4.6-8 passed
Result: Package existence check passed for "libgcc-3.4.5".

Check: Package existence for "libstdc++-devel-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 libstdc++-devel-3.4.6-9 passed
oradbdev01 libstdc++-devel-3.4.6-8 passed
Result: Package existence check passed for "libstdc++-devel-3.4.5".

Check: Package existence for "elfutils-libelf-0.97"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 elfutils-libelf-0.97.1-4elfutils-libelf-0.97.1-5 passed
oradbdev01 elfutils-libelf-0.97.1-4 passed
Result: Package existence check passed for "elfutils-libelf-0.97".

Check: Package existence for "glibc-2.3.4-2.19"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 failed
oradbdev01 failed
Result: Package existence check failed for "glibc-2.3.4-2.19".

Check: Package existence for "glibc-2.3.4-2.19"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 glibc-2.3.4-2.36 passed
oradbdev01 glibc-2.3.4-2.36 passed
Result: Package existence check passed for "glibc-2.3.4-2.19".

Check: Package existence for "glibc-common-2.3.4"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 glibc-common-2.3.4-2.36 passed
oradbdev01 glibc-common-2.3.4-2.36 passed
Result: Package existence check passed for "glibc-common-2.3.4".

Check: Package existence for "glibc-devel-2.3.4"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 glibc-devel-2.3.4-2.36 passed
oradbdev01 glibc-devel-2.3.4-2.36 passed
Result: Package existence check passed for "glibc-devel-2.3.4".

Check: Package existence for "glibc-devel-2.3.4"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 glibc-devel-2.3.4-2.36 passed
oradbdev01 glibc-devel-2.3.4-2.36 passed
Result: Package existence check passed for "glibc-devel-2.3.4".

Check: Package existence for "gcc-c++-3.4.5"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 gcc-c++-3.4.6-9 passed
oradbdev01 gcc-c++-3.4.6-8 passed
Result: Package existence check passed for "gcc-c++-3.4.5".

Check: Package existence for "compat-libstdc++-33-3.2.3"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 compat-libstdc++-33-3.2.3-47.3 passed
oradbdev01 compat-libstdc++-33-3.2.3-47.3 passed
Result: Package existence check passed for "compat-libstdc++-33-3.2.3".

Check: Package existence for "compat-libstdc++-33-3.2.3"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
oradbdev02 compat-libstdc++-33-3.2.3-47.3 passed
oradbdev01 compat-libstdc++-33-3.2.3-47.3 passed
Result: Package existence check passed for "compat-libstdc++-33-3.2.3".

Check: Group existence for "dba"
Node Name Status Comment
------------ ------------------------ ------------------------
oradbdev02 exists passed
oradbdev01 exists passed
Result: Group existence check passed for "dba".

Check: Group existence for "oinstall"
Node Name Status Comment
------------ ------------------------ ------------------------
oradbdev02 exists passed
oradbdev01 exists passed
Result: Group existence check passed for "oinstall".

Check: User existence for "nobody"
Node Name Status Comment
------------ ------------------------ ------------------------
oradbdev02 exists passed
oradbdev01 exists passed
Result: User existence check passed for "nobody".

System requirement failed for 'crs'

Pre-check for cluster services setup was unsuccessful on all the nodes.


The check has failed for me for checking if oracle users primary group is "oinstall". I am using dba as the groups. Hence I am omitting this error.

Now we are all set to start the OUI
[oracle@oradbdev01 clusterware]$ /home/oracle/software/11g/Cluster/clusterware/runInstaller
Now follow the screen shots:
The Welcome Screen - Press Next:

From For Blog


Select the location for your CRS_HOME, where the crs will get installed and Press Next:

From For Blog


Oracle does some pre-check, resolve any issues and Press Next:

From For Blog


Add information about the cluster nodes and the Press Next:

From For Blog


Example of how to add information:

From For Blog


Select the Public and Private IP address subnets and Press Next:

From For Blog


Specify OCR Location and Press Next:

From For Blog


Specify Voting Disk Location and Press Next:

From For Blog


Installation summary window, check for the remote node and Press Install:

From For Blog


Installation in Progress:

From For Blog


I received this error as I had not setup my environment properly before starting the installation.
Error from make.log
/usr/bin/make -f ins_rdbms.mk ipc_none ORACLE_HOME=/home/oracle/product/11.1.0/db//home/oracle/product/11.1.0/db/rdbms/lib/ins_rdbms.mk:2: /home/oracle/product/11.1.0/db/rdbms/lib/env_rdbms.mk: No such file or directory
make: *** No rule to make target `/home/oracle/product/11.1.0/db/rdbms/lib/env_rdbms.mk'. Stop.
I stopped the installation and setup ORACLE_HOME again and started the install again.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x0000002a9591bb92, pid=8270, tid=1094084960
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_11-b03 mixed mode)
# Problematic frame:
# V [libjvm.so+0x3a4b92]
#
# An error report file with more information is saved as hs_err_pid8270.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp

Again at this point my $PATH showed wrong path. Hence remove unnecessary entries from $PATH and restarted installation and it worked this time.

From For Blog


Run root.sh on both the nodes:

From For Blog


[oracle@oradbdev01 crs]$ sudo ./root.sh
Password:
WARNING: directory '/home/oracle/product/11.1.0' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up Network socket directories
PROT-1: Failed to initialize ocrconfig
Failed to upgrade Oracle Cluster Registry configuration

There were permission problems on the folders in node 2.
Resolved the issue and restarted the installation.
Node 1:
Running root.sh:
[oracle@oradbdev01 crs]$ sudo ./root.sh
WARNING: directory '/home/oracle/product/11.1.0' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
The directory '/home/oracle/product/11.1.0' is not owned by root. Changing owner to root
The directory '/home/oracle/product' is not owned by root. Changing owner to root
The directory '/home/oracle' is not owned by root. Changing owner to root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: oradbdev01 oradbdev01-priv oradbdev01
node 2: oradbdev02 oradbdev02-priv oradbdev02
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /DB01/11g_rac/voting_disk/vote1
Now formatting voting device: /DB01/11g_rac/voting_disk/vote2
Now formatting voting device: /DB01/11g_rac/voting_disk/vote3
Format of 3 voting devices complete.
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
oradbdev01
Cluster Synchronization Services is inactive on these nodes.
oradbdev02
Local node checking complete. Run root.sh on remaining nodes to start CRS daemons.

Node 2:
[oracle@oradbdev02 crs]$ sudo ./root.sh
Password:
WARNING: directory '/home/oracle/product/11.1.0' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully
The directory '/home/oracle/product/11.1.0' is not owned by root. Changing owner to root
The directory '/home/oracle/product' is not owned by root. Changing owner to root
The directory '/home/oracle' is not owned by root. Changing owner to root
clscfg: EXISTING configuration version 4 detected.
clscfg: version 4 is 11 Release 1.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: oradbdev01 oradbdev01-priv oradbdev01
node 2: oradbdev02 oradbdev02-priv oradbdev02
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
oradbdev01
oradbdev02
Cluster Synchronization Services is active on all the nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps

Creating VIP application resource on (2) nodes...
Creating GSD application resource on (2) nodes...
Creating ONS application resource on (2) nodes...
Starting VIP application resource on (2) nodes...
Starting GSD application resource on (2) nodes...
Starting ONS application resource on (2) nodes...


Done.

Oracle Run vipca and other configurations: Press Next after it completes:

From For Blog


Final Window - Installation Completed!!! - Press Exit:

From For Blog


[oracle@oradbdev01 bin]$ ./crsctl check crs
Cluster Synchronization Services appears healthy
Cluster Ready Services appears healthy
Event Manager appears healthy

[oracle@oradbdev02 bin]$ ./crsctl check crs
Cluster Synchronization Services appears healthy
Cluster Ready Services appears healthy
Event Manager appears healthy

This shows that crs installation was successful on both the nodes!!

Thursday, April 10, 2008

Oracle 10g RAC Installation on NetApps Raw Devices with ASM: Part 3

Installing and Configuring Oracle ASMlib

Oracle ASMlib is software provided to ease the configuration of Disk Devices.

Please download the library files from http://www.oracle.com/technology/tech/linux/asmlib/index.html

The library are available with respect to your OS and OS version. The current version of ASMlib is 2.0. With respect to my operating system I downloaded:

oracleasm-support-2.0.3-1.x86_64.rpm

oracleasmlib-2.0.2-1.x86_64.rpm

oracleasm-2.6.9-55.ELsmp-2.0.3-1.x86_64.rpm

oracleasm-2.6.9-55.EL-2.0.3-1.x86_64.rpm

Installation of these binaries:

rpm –Uvh oracleasm-support-2.0.3-1.x86_64.rpm

rpm –Uvh oracleasm-2.6.9-55.EL-2.0.3-1.x86_64.rpm

rpm –Uvh oracleasmlib-2.0.2-1.x86_64.rpm

rpm –Uvh oracleasm-2.6.9-55.ELsmp-2.0.3-1.x86_64.rpm

Install these binaries on all RAC nodes.

Initialize oracleasm (All Nodes):

# /etc/init.d/oracleasm configure

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

Fix permissions of Oracle ASM disks on boot (y/n) [y]

...

Note: Please make sure to enter default user and group to own the driver interface.

Creation of Disk Partitions and Oracle ASM Disk:

We are using 1 lun of 2GB to create partitions. We will create partitions for OCR, Voting Disk, and other database files.

You can also create separate luns for OCR, Voting Disk and DB files.

As we are using iSCSI devices we do not need to create disk partitions we can directly use /dev/sd* devices or as we are using multipath devices, we can directly use /dev/mpath/mpath*

For example sake I am creating disk partitions for this installation:

[root@oradbdev01 mpath]# fdisk /dev/dm-8 à LUN (multipath device)

Command (m for help): p

Disk /dev/dm-8: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009): +128M àOCR FILE

Command (m for help): p

Disk /dev/dm-8: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System

/dev/dm-8p1 1 61 126666 83 Linux

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (62-1009, default 62):

Using default value 62

Last cylinder or +size or +sizeM or +sizeK (62-1009, default 1009): +128M àOCR FILE

Command (m for help): p

Disk /dev/dm-8: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System

/dev/dm-8p1 1 61 126666 83 Linux

/dev/dm-8p2 62 122 126697 83 Linux

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 3

First cylinder (123-1009, default 123):

Using default value 123

Last cylinder or +size or +sizeM or +sizeK (123-1009, default 1009): +1000M àData File

Command (m for help): p

Disk /dev/dm-8: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System

/dev/dm-8p1 1 61 126666 83 Linux

/dev/dm-8p2 62 122 126697 83 Linux

/dev/dm-8p3 123 593 978267 83 Linux

Command (m for help): n

Command action

e extended

p primary partition (1-4)

e

Selected partition 4

First cylinder (594-1009, default 594):

Using default value 594

Last cylinder or +size or +sizeM or +sizeK (594-1009, default 1009):

Using default value 1009 à Creating extended partition of the remaing space.

Command (m for help): p

Disk /dev/dm-8: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System

/dev/dm-8p1 1 61 126666 83 Linux

/dev/dm-8p2 62 122 126697 83 Linux

/dev/dm-8p3 123 593 978267 83 Linux

/dev/dm-8p4 594 1009 864032 5 Extended

Command (m for help): n

First cylinder (594-1009, default 594):

Using default value 594

Last cylinder or +size or +sizeM or +sizeK (594-1009, default 1009): +20M àVoting Disk

Command (m for help): n

First cylinder (604-1009, default 604):

Using default value 604

Last cylinder or +size or +sizeM or +sizeK (604-1009, default 1009): +20M àVoting Disk

Command (m for help): n

First cylinder (614-1009, default 614): +20M

Value out of range.

First cylinder (614-1009, default 614):

Using default value 614

Last cylinder or +size or +sizeM or +sizeK (614-1009, default 1009): +20M àVoting Disk

Command (m for help): n

First cylinder (624-1009, default 624):

Using default value 624

Last cylinder or +size or +sizeM or +sizeK (624-1009, default 1009):

Using default value 1009 à Remaining space for Database files

Command (m for help): p

Disk /dev/dm-8: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System

/dev/dm-8p1 1 61 126666 83 Linux àOCR FILE

/dev/dm-8p2 62 122 126697 83 Linux àOCR FILE

/dev/dm-8p3 123 593 978267 83 Linux àDatabase

/dev/dm-8p4 594 1009 864032 5 Extended

/dev/dm-8p5 594 603 20739 83 Linux àVoting Disk

/dev/dm-8p6 604 613 20739 83 Linux àVoting Disk

/dev/dm-8p7 614 623 20739 83 Linux àVoting Disk

/dev/dm-8p8 624 1009 801691 83 Linux àDatabase

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 22: Invalid argument.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

Reboot all nodes to read the partition table.

The devices will look like this:

[oracle@oradbdev01 ~]$ ls -lrt /dev/mpath/mpath8*

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8 -> ../dm-0

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8p2 -> ../dm-4

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8p6 -> ../dm-8

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8p1 -> ../dm-2

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8p5 -> ../dm-7

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8p7 -> ../dm-9

lrwxrwxrwx 1 root root 8 Apr 10 15:02 /dev/mpath/mpath8p8 -> ../dm-10

lrwxrwxrwx 1 root root 7 Apr 10 15:02 /dev/mpath/mpath8p3 -> ../dm-6

Now add database disk devices to oracle asm:

[root@oradbdev01 mpath]# /etc/init.d/oracleasm createdisk DISK3 /dev/mpath/mpath8p3;

Marking disk "/dev/mpath/mpath8p3" as an ASM disk: [ OK ]

[root@oradbdev01 mpath]# /etc/init.d/oracleasm createdisk DISK4 /dev/mpath/mpath8p8;

Marking disk "/dev/mpath/mpath8p8" as an ASM disk: [ OK ]

Run the command "/etc/init.d/oracleasm scandisks" on all other nodes so that ASM disks will show up on all other nodes.

[root@oradbdev02 ~]# /etc/init.d/oracleasm scandisks

Scanning system for ASM disks: [ OK ]

Run the command /etc/init.d/oracleasm listdisks and /etc/init.d/oracleasm querydisk on all nodes to verify the disks has been marked as ASM disks. For example:

[oracle@oradbdev01 ~]$ ssh oradbdev02 /etc/init.d/oracleasm listdisks

DISK1

DISK2

DISK3

DISK4

[oracle@oradbdev01 ~]$ /etc/init.d/oracleasm querydisk DISK3

Disk "DISK3" is a valid ASM disk on device [8, 19]

[oracle@oradbdev01 ~]$ ssh oradbdev02 /etc/init.d/oracleasm querydisk DISK3

Disk "DISK3" is a valid ASM disk on device [8, 19]

[oracle@oradbdev01 ~]$ /etc/init.d/oracleasm querydisk DISK4

Disk "DISK4" is a valid ASM disk on device [8, 24]

[oracle@oradbdev01 ~]$ ssh oradbdev02 /etc/init.d/oracleasm querydisk DISK4

Disk "DISK4" is a valid ASM disk on device [8, 24]

[root@oradbdev01 ~]# /etc/init.d/oracleasm querydisk /dev/mpath/mpath8p3

Disk "/dev/mpath/mpath8p3" is marked an ASM disk with the label "DISK3"

[root@oradbdev01 ~]# /etc/init.d/oracleasm querydisk /dev/mpath/mpath8p8

Disk "/dev/mpath/mpath8p8" is marked an ASM disk with the label "DISK4"

To find out the exact disk reflected in the output of oracleasm, use the entries in /proc/partitions file.

Configuring ASMlib on Multipath Disk:

[root@oradbdev01 ~]# vi /etc/sysconfig/oracleasm

#

# This is a configuration file for automatic loading of the Oracle

# Automatic Storage Management library kernel driver. It is generated

# By running /etc/init.d/oracleasm configure. Please use that method

# to modify this file

#

# ORACLEASM_ENABELED: 'true' means to load the driver on boot.

ORACLEASM_ENABLED=true

# ORACLEASM_UID: Default user owning the /dev/oracleasm mount point.

ORACLEASM_UID=oracle

# ORACLEASM_GID: Default group owning the /dev/oracleasm mount point.

ORACLEASM_GID=dba

# ORACLEASM_SCANBOOT: 'true' means fix disk perms on boot

ORACLEASM_SCANBOOT=true

# ORACLEASM_CLEARBOOT: 'true' means clean old disk perms on boot

ORACLEASM_CLEARBOOT=true

# ORACLEASM_SCANORDER: Matching patterns to order disk scanning

ORACLEASM_SCANORDER="dm" ##Updated it to “dm”

# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan

ORACLEASM_SCANEXCLUDE="sd" ##Updated it to “sd”

Make these changes in all the nodes.

Preparing & Configuring OCR and Voting Disk on Raw devices using Multipath or Udev:

On Linux platform, the LUNs presented from NAS or SCSI devices are identified with the device name (or path) /dev/sdx (/dev/sda, dev/sdb, etc). A common issue is that the device names (including multipath device name like /dev/mpath/mpath0 if multipath is enabled) can be changed when some disks are removed or added (as planned or due to I/O failures), SCSI or FC is reconfigured (like adding or removing ISCSI channels) or even host is rebooted. Even these devices are bound to raw with the consistent name (like /dev/raw/raw1) and assigned to OCR and voting disks, starting CRS can still fail because of the content of the device is not the OCR or the voting disk. To address this issue, you can use either multipath software or udev utility to setup devices with consistent name for OCR and voting disks.

multipath - multipath is a native Linux dynamic multipathing/failover software. An I/O path generally consists of an initiator port, target port, and LUN. Each permutation of this I/O is considered an independent path. Dynamic multipathing/failover tools (software or hardware) aggregate these independent paths into a single logical path. This path virtualization provides I/O load-balancing and non-disruptive failover across the host bus adapters (HBAs) or network interface card (NIC). Multipath software also can assign a consistent device name to LUNs as described in next section.

More info: http://en.wikipedia.org/wiki/Multipath_I/O

udev - udev is a new feature introduced in Linux 2.6. It provides a dynamic device directory containing only the files for actually present devices. It creates or removes device node files usually located in the /dev directory, or it renames network interfaces. As part of the hotplug subsystem, udev is executed if a kernel device is added or removed from the system. On device creation, udev reads the sysfs directory of the given device to collect device attributes like label, serial number or bus device number. These attributes may be used as keys to determine a unique name for the device.

More info: http://en.wikipedia.org/wiki/Udev

Configuring OCR & Voting Disk:

1. Choose the multipath device which will hold the ocr & voting disk files.

e.g /dev/mpath/mpath8

[root@oradbdev01 dev]# multipath -d -l mpath8

mpath8 (360a9800043346d77674a486332443238)

[size=2 GB][features="1 queue_if_no_path"][hwhandler="0"]

\_ round-robin 0 [active]

\_ 0:0:0:1 sdb 8:16 [active]

2. Rediscover all multipath devices on all nodes:

Note: Please shutdown all databases and ASM running on the affect nodes, as this will remove all multipath devices.

[root@oradbdev01 dev]# multipath –F

[root@oradbdev01 dev]# multipath –v2

As we have already created paritions, for probing these new partition devices on all the other nodes run:

[root@oradbdev02 dev]# partprobe

Instead you can also do:

/etc/init.d/iscsi reload

3. Make these changes to the /etc/sysconfig/rawdevices file, these are for OCR & Voting Disk.

[root@oradbdev01 dev]# more /etc/sysconfig/rawdevices

# This file and interface are deprecated.

# Applications needing raw device access should open regular

# block devices with O_DIRECT.

# raw device bindings

# format:

#

# example: /dev/raw/raw1 /dev/sda1

# /dev/raw/raw2 8 5

/dev/raw/raw1 /dev/mpath/mpath8p1

/dev/raw/raw2 /dev/mpath/mpath8p2

/dev/raw/raw3 /dev/mpath/mpath8p3

/dev/raw/raw8 /dev/mpath/mpath8p8

/dev/raw/raw4 /dev/mpath/mpath8p5

/dev/raw/raw5 /dev/mpath/mpath8p6

/dev/raw/raw6 /dev/mpath/mpath8p7

4. Bind the disk devices to the raw devices on all nodes as follow:

/sbin/service rawdevices restart

5. Run the following command as root on all nodes so that system automatically binds the devices listed in the rawdevices file when it reboots.

/sbin/chkconfig --level 345 rawdevices on

6. Setup the owner, group and permissions on the OCR and voting disks as root on all nodes as follow:

For OCR:

chown root:dba /dev/raw/raw1

chown root:dba /dev/raw/raw2

chmod 660 /dev/raw/raw1

chmod 660 /dev/raw/raw2

For voting disks:

chown oracle:dba /dev/raw/raw4

chown oracle:dba /dev/raw/raw5

chown oracle:dba /dev/raw/raw6

chmod 660 /dev/raw/raw4

chmod 660 /dev/raw/raw5

chmod 660 /dev/raw/raw6

7. For RHEL4, add the following lines in /etc/rc.d/rc.local as root on all nodes so that system will setup the owner, group and permissions properly after reboot.

# For OCR:

chown root:dba /dev/raw/raw1

chown root:dba /dev/raw/raw2

chmod 660 /dev/raw/raw1

chmod 660 /dev/raw/raw2

# For voting disks:

chown oracle:dba /dev/raw/raw4

chown oracle:dba /dev/raw/raw5

chown oracle:dba /dev/raw/raw6

chmod 660 /dev/raw/raw4

chmod 660 /dev/raw/raw5

chmod 660 /dev/raw/raw6

8. Initialize the OCR and voting disk as root on one node as follow.

dd if=/dev/zero of=/dev/mpath/mpath8p1 bs=125829120 count=1

dd if=/dev/zero of=/dev/mpath/mpath8p2 bs=125829120 count=1


dd if=/dev/zero of=/dev/mpath/mpath8p5 bs=20971520 count=1

dd if=/dev/zero of=/dev/mpath/mpath8p6 bs=20971520 count=1

dd if=/dev/zero of=/dev/mpath/mpath8p7 bs=20971520 count=1

10. Now most importantly setting up udev permission.

Incase you do not make this changes during CRS installation you will get error.

When you would specify the OCR device location in the CRS installation page it will give error that “The specified shared raw partition /dev/raw/raw1 may not have correct permission. Verify that the partition is owned by Oracle User.”

This is a misleading error, and will make us do changes to the actual permission of the devices. I had struggled with this error for a couple of day before I realized that I need to create a file /etc/udev/permissions.d/40-udev.permissions.

[oracle@oradbdev01 logs]$ more /etc/udev/permissions.d/40-udev.permissions

# dm devices

dm-*:root:dba:0660

# ocr devices --inserted by apun

raw/raw1:root:dba:660

raw/raw2:root:dba:660

# voting disk --inserted by apun

raw/raw4:oracle:dba:660

raw/raw5:oracle:dba:660

raw/raw6:oracle:dba:660

Also comment out all entries for these devices in /etc/udev/permissions.d/50-udev.permissions file. The OS & oracle needs to refer to only /etc/udev/permissions.d/40-udev.permissions file.

Make these changes on all the RAC servers.

And reboot all the nodes.

This should complete all steps prior to starting any installation. Now you can download oracle crs and database software and start installation.

Important links to refer for more information;

http://www.oracle.com/technology/tech/linux/asmlib/index.html

Please refer to metalink notes: 465001.1 (for more info on udev)

Part 1

Part 2

Wednesday, April 9, 2008

Oracle 10g RAC Installation on NetApps Raw Devices with ASM: Part 2

Start the iSCSI service on the hosts:

If you are using dm-multipath, be sure you have configured multipathing before starting iSCSI.

Use the following the command to start iSCSI on all hosts:

sudo /etc/init.d/iscsi start

Add the iSCIS service to the boot sequence by entering the following commands:

sudo chkconfig --add iscsi

sudo chkconfig --list iscsi

sudo chkconfig iscsi on

To view the LUN information from the host:

[root@oradbdev02 ~]# iscsi-ls -l

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

SFNet iSCSI Driver Version ...4:0.1.11-6(03-Aug-2007)

***************************************************************************TARGET NAME : iqn.1992-08.com.netapp:sn.101198981

TARGET ALIAS :

HOST ID : 0

BUS ID : 0

TARGET ID : 0

TARGET ADDRESS : 10.66.81.75:3260,1000

SESSION STATUS : ESTABLISHED AT Tue Apr 8 13:45:30 IST 2008

SESSION ID : ISID 00023d000001 TSIH 37

DEVICE DETAILS:

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

LUN ID : 0

Vendor: NETAPP Model: LUN Rev: 0.2

Type: Direct-Access ANSI SCSI revision: 04

page83 type3: 60a9800043346d77674a484d2f6e7758

page80: 43346d77674a484d2f6e77580a

Device: /dev/sda

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

The output show that device /dev/sda is a LUN (LUN ID: 0) on the Netapps storage with IP Address 10.66.81.75.

If iSCSI Initiator Support Kit has been installed on the host, you can run the command "sanlun" to get a better view on LUNs.

[root@oradbdev02 ~]# sanlun lun show

filer: lun-pathname device filename adapter protocol lun size lun state

silo: /vol/vol1/ractest.lun /dev/sda host0 iSCSI 2g (2147483648) GOOD

Discovering new LUNs

If you create a new LUN and map it to the Linux host, you can discover the LUN by reloading the iscsi service on the host. To reload the iscsi service, enter the following command on the hosts:

/etc/init.d/iscsi reload

View multipath devices:

[root@oradbdev02 ~]# multipath -d -l

mpath6 (360a9800043346d77674a484d2f6e7758)

[size=2 GB][features="1 queue_if_no_path"][hwhandler="0"]

\_ round-robin 0 [active]

\_ 0:0:0:0 sda 8:0 [active]

Part 1

Part 3