Operating System - Linux
1827481 Members
2298 Online
109965 Solutions
New Discussion

Create raw devices on RedHat AS 4.0

 
Cliff Lim Kok Hwee
Regular Advisor

Create raw devices on RedHat AS 4.0

Hi Forum,

I will be connecting HP EVA storage from my linux servers.

How do i create raw devices for ORACLE 1OG RAC installation?

Thanks/cliff
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Create raw devices on RedHat AS 4.0

Shalom Cliff,

I suggest the following:

install the following two rpms:

libraw1394-0.10.1-3
libraw1394-devel-0.10.1-3

chkconfig rawdevices on

chkconfig --list | grep raw

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cliff Lim Kok Hwee
Regular Advisor

Re: Create raw devices on RedHat AS 4.0

Sir, then i will to run fdisk to create as below mentioned?

"fdisk /dev/spdev/sp"

For RAC the raw partition will not be residing in any vg? Am i correct? As such we cannot use the conventional method of creating logical volumes for raw partition?

Thanks cliff
Steven E. Protter
Exalted Contributor

Re: Create raw devices on RedHat AS 4.0

I misunderstood your question.

rawdevices if for clustering. You may need my prior instructions to make RAC work in a cluster.

What you do to create raw storage for oracle is to create the partition with fdisk.

Then you don't run the newfs command. Change the ownership of the dev files to oracle:dba or whatever the default id that owns the oracle 10G RAC.

Then you are ready to have oracle installed and create databases for RAC.

If RAC has the option, I recommend doing this on filesystem instead of raw devices. It make s management and backups a bit easier.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cliff Lim Kok Hwee
Regular Advisor

Re: Create raw devices on RedHat AS 4.0

Hi Sir,

I need to carry out his portion of work on RAW partition it seems.

Prepare RAW devices for Cluster Ready Services and ASM
For ASM, the first two shared LUNs presented to Linux will be used for OCR and the next three for voting disks. The partition sizes need to be:
Partition Recommended Minimum
OCR 200M 100M
OCR 200M 100M
voting 100m 25M
voting 100m 25M
voting 100m 25M

Query: So is only raw partitions i guess.

Query: Wht kind of partition should this be from the storage LUN presented? Wht i meant is from fdisk they will ask u whether u want primary partition etc.

Thanks for the knowledge sharing!cliff
Vitaly Karasik_1
Honored Contributor

Re: Create raw devices on RedHat AS 4.0

In order to bind disk partition to linux raw device you should add the following line into /etc/sysconfig/rawdevices:

/dev/raw/raw1 /dev/sda1
(for permanent binding)

or run thew followig command

raw /dev/raw/raw1 /dev/sda1
(one-time binding)

Rgds,
Vitaly
Tait Sanders
Occasional Advisor

Re: Create raw devices on RedHat AS 4.0

Here's how I created the raw devices for a 3 node Oracle 10g RAC cluster.

Create the 3 raw devices for Oracle CRS

# 1 x 200MB raw disk for the Oracle Cluster Registry (OCR) quorum file
# 1 x 40MB raw disk for the CRS Voting Disk file
# 1 x restMB raw disk for ASM disk creation

Partition and set system id:
#in this example I used partition sdb for Oracle CRS
e.g. fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2493 19920600 83 Linux
/dev/sda3 2494 3146 5245222+ 83 Linux
/dev/sda4 3147 3916 6185025 f Win95 Ext'd (LBA)
/dev/sda5 3147 3538 3148708+ 82 Linux swap
/dev/sda6 3539 3799 2096451 83 Linux

Disk /dev/sdb: 59.0 GB, 59041120256 bytes
255 heads, 63 sectors/track, 7178 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Use fdisk to create partitions:
fdisk /dev/sdb
create the 1st partition of 200Mb (sdb1)
create the 2nd partition of 40Mb (sdb2)
create a 3rd partition of the rest of the available space (sdb3)
* change the system ID to 60 for all three
write the changes

Bind raw devices using raw command:
raw /dev/raw/raw1 /dev/sdb1
raw /dev/raw/raw2 /dev/sdb2
raw /dev/raw/raw3 /dev/sdb3

do 'raw -qa' (should list raw devices)

Bind raw devices at startup:
add the raw commands as above to /etc/sysconfig/rawdevices
# raw device bindings
# format:
#
# example: /dev/raw/raw1 /dev/sda1
# /dev/raw/raw2 8 5
raw /dev/raw/raw1 /dev/sdb1
raw /dev/raw/raw2 /dev/sdb2
raw /dev/raw/raw3 /dev/sdb3


Change owner:group of raw devices:
chown oracle:dba /dev/raw/raw1
chown oracle:dba /dev/raw/raw2
chown oracle:dba /dev/raw/raw3
chown oracle:dba /dev/sdb1
chown oracle:dba /dev/sdb2
chown oracle:dba /dev/sdb3

Change permissions of raw devices:
chmod 660 /dev/raw/raw1
chmod 660 /dev/raw/raw2
chmod 660 /dev/raw/raw3
chmod 660 /dev/sdb1
chmod 660 /dev/sdb2
chmod 660 /dev/sdb3

Great resources for Oracle 10g Rac installation on RHEL* etc see - http://www.puschitz.com/