Wednesday, November 21, 2007

Steps to create the OCR and voting disk on raw devices

When installing Oracle CRS, OUI will request the location of the OCR and voting disk. List the appropriate disk names as requested.

Oracle Database Release Notes 10gR2 for Linux based systems.

Prior to installing Oracle CRS, the raw devices that will keep the OCR and voting disk files, must be defined and initialized using the following procedure.

1. Determine which disk devices will be used store the OCR and voting disk file.

2. Execute cat /proc/partitions command on all nodes to verify that the selected devices are available on nodes of the cluster.

3. Run fdisk command to create and label a 200Mb partition for the OCR device and a 100 Mb partition for voting disk.

4. Re-run cat /proc/partitions to verify that the partitions are available.

$ cat /proc/partitions

For example, the /dev/sdb1 and /dev/sdc1 will be used for OCR and for voting disk; respectively.

5. Initialize the devices using dd.
OCR disk device
dd if=/dev/zero of=/dev/sdb1 bs=1M count=1
Voting disk
dd if=/dev/zero of=/dev/sdc1 bs=1M count=1

6. On Linux systems, complete the following steps to bind the disk devices to raw
devices:

a. To determine what raw devices are already bound to other devices, enter the
following command:
/usr/sbin/raw -qa

Raw devices have device names in the form /dev/raw/rawn, where n is a
number that identifies the raw device.

b. Open the /etc/sysconfig/rawdevices file in any text editor and add a
line similar to the following for each device that you want to use for the voting and OCR disks. Note, Specify an unused raw device for each disk device.
/dev/raw/rawn /dev/sdb1
/dev/raw/rawn /dev/sdc1

c. For each raw device that you specified in the rawdevices file, enter commands similar to the following to set the owner, group, and permissions on the device file.

The OCR device must set initially to 660 and root:dba. The root.sh script will to reset to the appropriate permissions.
OCR
chown root:dba /dev/raw/rawn
chmod 660 /dev/raw/rawn

Voting disk
chown oracle:dba /dev/raw/rawn
chmod 660 /dev/raw/rawn

d. To bind the disk devices to the raw devices, enter the following command:
/sbin/service rawdevices restart
The system automatically binds the devices listed in the rawdevices file
when it reboots.

Note: At the time of installing Oracle CRS, OUI will request the location of the OCR and voting disk. I am going to cover this with screen-shot in my next post which include installtion of Oracle Enterpises Linux on VMWARE.

1 comment:

Anonymous said...

Hi Ramanik,

Nice post.

I wanted to know, how we can see to which raw device, the particular software is built..

say for eg., how to find on which raw device ASM has been built.

thx
sunil