LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Red Hat Linux Enterprise 5 cannot make raw devices (https://www.linuxquestions.org/questions/linux-newbie-8/red-hat-linux-enterprise-5-cannot-make-raw-devices-877509/)

d.eykamp@att.net 04-27-2011 10:29 PM

Red Hat Linux Enterprise 5 cannot make raw devices
 
I need eight (8) raw devices for use with Oracle 11g. I am having a time trying to get these configured and persistent? Anyone have a post. I'm sure someone has figured out how to do this in version 5. Thank you for your kind replies.

spankbot 04-28-2011 03:12 PM

Quote:

Originally Posted by d.eykamp@att.net (Post 4338749)
I need eight (8) raw devices for use with Oracle 11g. I am having a time trying to get these configured and persistent? Anyone have a post. I'm sure someone has figured out how to do this in version 5. Thank you for your kind replies.

Can you show us what commands you're using and what errors you're getting? Any other details you can provide will obviously help.

John VV 04-28-2011 03:23 PM

and PLEASE include the version of RHEL 5 you are using
RHEL5.0
RHEL5.1
RHEL5.2
RHEL5.3
RHEL5.4
RHEL5.5
RHEL5.6


also seeing as both Oracle and red hat are NOT free and REQUIRE a support contract
and that Oracle has THERE own OS for there database

have you asked your PAID for Oracle AND red hat tech support

omgs 04-29-2011 02:04 AM

You can edit /etc/sysconfig/rawdevices for specifying your devices (the syntax is the same that the raw command, but removing raw), and then, init rawdevices as if it was a service (i.e., /etc/init.d/rawdevices start/stop, or with service).

venikathir 04-29-2011 02:34 AM

Hi Dude
in oracle 11G having a good future there is no need of RAW devices in RHEL5
if u need to configure the some permissions on during boot time pls enter the permissions on /et/rc.local file


hope this will help u

regards
Kathir

omgs 04-29-2011 03:31 AM

If you go with raw, you can set permissions via udev following the example in /etc/udev/rules.d/60-raw.rules instead of /etc/rc.local, which is very dirty.

PD: I really *hate* oracle intromissions into unix sysadmin's work, just like in a windows state of mind

d.eykamp@att.net 04-30-2011 06:40 PM

Red Hat Linux Enterprise 5 cannot make raw devices
 
Thank you, thank you, thank you for your replies.

1) I got the devices to work and should add a udev rule to make sure it continues to work.

I created raw files and linked them to a block device.
#raw /dev/raw/raw1 /dev/hdb1

Would this method have worked also?

# mknod /u02/oradata/asmdisks/disk01 c 162 1
# mknod /u02/oradata/asmdisks/disk02 c 162 2
# mknod /u02/oradata/asmdisks/disk03 c 162 3
# mknod /u02/oradata/asmdisks/disk03 c 162 4

$ ln -s /dev/hdb1 /u02/oradata/asmdisks/disk01
$ ln -s /dev/hdb2 /u02/oradata/asmdisks/disk02
$ ln -s /dev/hdb3 /u02/oradata/asmdisks/disk03
$ ln -s /dev/hdb4 /u02/oradata/asmdisks/disk04

venikathir 05-18-2011 05:44 AM

here the sample rc.local file

$ sudo vi /etc/rc.local

# create oracle RAW devices
# all devices from /dev/mapper/raw* are mapped!

for DEVICE in /dev/mapper/raw*
do
/bin/raw /dev/raw/`/bin/basename ${DEVICE}` ${DEVICE}
/bin/sleep 2
done
/bin/sleep 2
/bin/chown root:dba /dev/raw/raw1
/bin/chown oracle:dba /dev/raw/raw2

# temp solution until good udev rules are found
/bin/chown oracle:dba /dev/mapper/arch*
/bin/chown oracle:dba /dev/mapper/dbs*
/bin/chown oracle:dba /dev/mapper/redo*
/bin/chown oracle:dba /dev/mapper/undo*

/etc/init.d/oracleasm start



like this u can make your entries in rc.local according to your UDEV

venikathir 05-18-2011 05:50 AM

Disable the oracleasm script to not start-up automatically.
$ sudo /sbin/chkconfig oracleasm off
Ensure oracleasm won’t start up automatically.
$ sudo /sbin/chkconfig oracleasm --list

after that u can make changes in rc.local according to ur UDEV names.

farooqmncl 05-18-2011 06:06 AM

what is use if your stop oracleasm service?


Khan,
India

omgs 05-29-2011 05:31 AM

I'll try to adapt what I did some months ago for RHEL 5.5 and Oracle 10g using raw devices to your specific setup, just to help here for using raw devices in 11g, regardless oracle recommendations/support for raw devices in 11g.

The background is to use custom udev rules and use symlinks a custom dedicated directory under /dev/ for oracle instead of using any of the standard directories, not to be "scanned" by anyone, including root. Custom names for symlinks can also be used in order to know what is that device for.

1) Put your raw devices in /etc/sysconfig/rawdevices, like this:
/dev/raw/raw1 /dev/hdb1

2) Set the udev rules. Let's keep your "asmdisks" directory name for symlinks. I set the prefix "ocr" for the two ocrs (assigning on purpose "raw1" and "raw2"), "voting" for voting disks (raw3 to raw5), and the rest (from raw10 on), leave as is. In 11g, I think some don't exist, but anyway, you can play with it:

# cat /etc/udev/rules.d/90-asmdisks.rules
SUBSYSTEM=="raw", KERNEL=="raw[12]", ACTION=="add|change", OWNER="root", GROUP="dba", MODE="0600", SYMLINK+="asmdisks/ocr%n"
SUBSYSTEM=="raw", KERNEL=="raw[3-5]", ACTION=="add|change", OWNER="oracle", GROUP="dba", MODE="0600", SYMLINK+="asmdisks/voting%n"
SUBSYSTEM=="raw", KERNEL=="raw1[0-9]", ACTION=="add|change", OWNER="oracle", GROUP="dba", MODE="0660", SYMLINK+="asmdisks/%k"

3) Test your rules. YOU SHOULD STOP ORACLE AND ASM FIRST. Then, unmap your existing raw devices. Check if "/etc/init.d/rawdevices stop" does the work (map to 0 0 if not). When there are no raw devices, then map them all by running "/etc/init.d/rawdevices start", and check if the symlinks exist and the proper permissions in /dev/raw/.

4) Point asm to use /dev/asmdisks for the devices, and start the software. Everything should work fine.


All times are GMT -5. The time now is 03:51 AM.