Chapter 13. Configuring I/O for Raw Partitions
40
And the
/etc/sysconfig/rawdevices
file would look something like this if you use EMC
PowerPath:
/u02/oradata/asmdisks/disk01 /dev/emcpowera
/u02/oradata/asmdisks/disk02 /dev/emcpowerb
/u02/oradata/asmdisks/disk03 /dev/emcpowerc
/u02/oradata/asmdisks/disk04 /dev/emcpowerd
In this example, 4 raw devices have been created using minor numbers 1 through 4. This means
that the devices
/dev/raw/raw1../dev/raw/raw4
should not be used by any application on the
system. But this should not be an issue since all raw devices should be configured in one place, which
is the
/etc/sysconfig/rawdevices
file. Note that you could also partition the LUNs or disks and
configure a raw device for each disk partition.
13.4. Using Block Devices for Oracle 10g Release 2 in Red
Hat Enterprise Linux 4 and 5
For Oracle 10g Release 2 in Red Hat Enterprise Linux 4 and 5 it is not recommended to use raw
devices but to use block devices instead. Raw I/O is still available in Red Hat Enterprise Linux 4 and
5, but it is now a deprecated interface. In fact, raw I/O has been deprecated by the Linux community. It
has been replaced by the
O_DIRECT
flag, which can be used for opening block devices to bypass the
operating system's cache. Unfortunately,
Oracle Clusterware R2 OUI
has not been updated and still
requires raw devices or a Cluster File System. There is also another bug, see bug number
5021707
3
.
By default, reading and writing to block devices are buffered I/Os.
Oracle Database 10g R2
now
automatically opens all block devices such as SCSI disks using the
O_DIRECT flag
, thus bypassing
the OS cache. For example, when you create disk groups for ASM and you want to use the SCSI
block devices
/dev/sdb
and
/dev/sdc
, you can simply set the Disk Discovery Path to "
/dev/
sdb, /dev/sdc
" to create the ASM disk group. There is no need to create raw devices and to point
the Disk Discovery Path to it.
Using the ASM example from
Section 13.3, “Using Raw Devices for Oracle Databases”
, the Oracle
data directory could be setup the following way:
$ ln -s /dev/emcpowera /u02/oradata/asmdisks/disk01
$ ln -s /dev/emcpowerb /u02/oradata/asmdisks/disk02
$ ln -s /dev/emcpowerc /u02/oradata/asmdisks/disk03
$ ln -s /dev/emcpowerd /u02/oradata/asmdisks/disk04
And the following command needs to be executed after each reboot:
# chown oracle.dba /u02/oradata/asmdisks/*
You need to ensure that the ownership of block devices is changed to
oracle:dba
or
oracle:oinstall
. Otherwise Oracle can not access the block devices and ASM disk discovery
will not list them. You also need to ensure that the ownership of block devices is set after each reboot
since Linux changes the ownership of block devices back to "
brw-rw---- 1 root disk
" at boot
time.
3
http://www.oracle.com/technology/tech/linux/validated-configurations/html/vc_dell6850-rhel4-cx500-1_1.html
Содержание CLUSTER SUITE FOR ENTERPRISE LINUX 5.1
Страница 7: ...Part I Tuning and Optimizing Red Hat Enterprise Linux for Oracle Database 9i and 10g ...
Страница 8: ......
Страница 10: ...4 ...
Страница 16: ...10 ...
Страница 28: ...22 ...
Страница 30: ...24 ...
Страница 36: ...30 ...
Страница 42: ...36 ...
Страница 54: ...48 ...
Страница 60: ...54 ...
Страница 68: ...62 ...
Страница 72: ...66 ...
Страница 88: ...82 ...
Страница 90: ...84 ...
Страница 92: ...86 ...
Страница 94: ...88 ...
Страница 98: ...92 ...
Страница 108: ...102 ...
Страница 112: ...106 ...
Страница 120: ...114 ...
Страница 122: ......
Страница 128: ...122 ...
Страница 132: ...126 ...
Страница 134: ...128 ...
Страница 142: ...136 ...
Страница 146: ...140 ...
Страница 156: ...150 ...
Страница 160: ...154 ...