X

Alejandro Vargas' Blog

  • July 5, 2007

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

Alejandro Vargas
Technical Leader, ACS Global Delivery, Infrastructure & BigData

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

Join the discussion

Comments ( 3 )
  • BOK Thursday, July 5, 2007
    Thanks Alejandro, that might come in handy today or tomorrow!
    AFAIK this must be for Linux, right?
  • kalpit Wednesday, July 11, 2007
    Thanks Alejandro.. Your blogs really helpful..
  • Lutz Hartmann Tuesday, August 28, 2007
    Hi Alexandro, thanks for this very good post!
    Very usefull for me in my RAC classes!
    =;-)
    Lutz
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services