« RAC on ASM replication using an NFS mounted File System | Main | Database location on the storage frame »

How to setup raw devices on Linux when /dev/raw does not exist

Sometimes you need to configure raw devices for OCR, Votingdisk and ASM Spfile, but the directory /dev/raw does not exist.

As root create the /dev/raw directory:

    mkdir /dev/raw

Then create the required raw devices using the following sintax:

mknod raw<raw_dev_number> c 162  <raw_dev_number>


i.e.:

mknod raw1 c 162 1


For setting up 12 raw devices use a loop:

#!/bin/ksh
x=1
cd /dev/raw
while [ $x -lt 12 ];
do
  mknod raw$x c 162 $x
    x=`expr $x + 1 `
done

Once configured create or update the script /etc/udev/scripts/dev-raw.sh to automatize the configuration of raw devices for RAC on each startup

# raw-dev.sh
MAKEDEV raw
mv /dev/raw/raw1 /dev/raw/votingdisk
mv /dev/raw/raw2 /dev/raw/ocr.dbf
mv /dev/raw/raw3 /dev/raw/spfile+ASM.ora

chmod 660 /dev/raw/votingdisk
chmod 660 /dev/raw/ocr.dbf
chmod 660 /dev/raw/spfile+ASM.ora

chown oracle:dba /dev/raw/votingdisk
chown oracle:dba /dev/raw/ocr.dbf
chown oracle:dba /dev/raw/spfile+ASM.ora

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mte1521/mt-tb.cgi/4313

Comments (3)

BOK:

Thanks Alejandro, that might come in handy today or tomorrow!
AFAIK this must be for Linux, right?

kalpit:

Thanks Alejandro.. Your blogs really helpful..

Hi Alexandro, thanks for this very good post!
Very usefull for me in my RAC classes!
=;-)
Lutz

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on July 5, 2007 9:09 AM.

The previous post in this blog was RAC on ASM replication using an NFS mounted File System.

The next post in this blog is Database location on the storage frame.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle