RAW applications in RedHatLinux

Source: Internet
Author: User
A bare device, also called a raw partition, is a special character device that is not formatted and read by unix through a file system. It is read and written by the application. Buffer through the file system. Because the bare device does not pass through the unix operating system, data is transmitted directly from disk to Oracle. Therefore, the bare device is used for database applications with frequent reads and writes, it can greatly improve the performance of the database system. Of course, this is because the disk I/o is very large, and disk I/o is already known as a system bottleneck.

A bare device, also called a raw partition, is a special character device that is not formatted and read by unix through a file system. It is read and written by the application. Buffer through the file system.

Because the bare device does not pass through the unix operating system, data is transmitted directly from disk to Oracle. Therefore, the bare device is used for database applications with frequent reads and writes, it can greatly improve the performance of the database system. Of course, this is true when the disk I/o is very large and the disk I/o is already known as a system bottleneck. If the disk read/write operation is so frequent that the disk read/write operation becomes the bottleneck of the system, bare devices can greatly improve the performance.

Bind RedHat EL4 to a bare Device

Two methods:

1) command binding

Raw/dev/raw [n]/dev/xxx

The range of n is 0-8191. You can create a raw directory.

Run this command to generate a corresponding raw [n] File under/dev/raw.

Binding a bare device by command will become invalid after the system is restarted.

2) modify the raw configuration file

Modify the/etc/sysconfig/rawdevices file as follows to automatically load the bare device upon startup, such:

/Dev/raw/raw1/dev/sdb1

In this way, you can bind a bare device by starting the service.

You can also write this command on/etc/rc. local to execute these commands at each startup.

3) change the owner of the bare Device

Two methods:

Run the following command to uninstall/etc/rc. local:

Chown oracle: oinstall/dev/raw/raw1

Modify the/etc/udev/permissions. d/50-udev.permissions file:

Slave

Raw/*: root: disk: 0660

Change

Raw/*: oracle: oinstall: 0660

This means that the default owner of the bare device is oracle: oinstall, and the default mode is 0660.

 

Bind RedHat EL5 to a bare Device

The Redhat version 5 and later have removed the support for bare devices. Therefore, the bare devices used when installing Oracle RAC must be set through Udev:

Set restart to automatically mount bare Devices

 

# Vi/etc/udev/rules. d/60-raw.rules

Add the following content-either of the two methods

Device Name:

ACTION = "add", KERNEL ="", RUN + =" raw/dev/raw/rawX % N"

Primary/secondary number:

ACTION = "add", ENV {MAJOR} = "A", ENV {MINOR} = "B ", RUN + = "raw/dev/raw/rawX % M % m"

Replace it with the device name you need to bind(For example,/dev/sda1 ). "A" and "B" are the device's primary/secondary numbers, and X is the raw device number used by the system.

ACTION = "add", KERNEL = "sdb1", RUN + = "/bin/raw/dev/raw/raw1% N"

ACTION = "add", ENV {MAJOR} = "8", ENV {MINOR} = "1 ", RUN + = "/bin/raw/dev/raw/raw2% M % m"

Make sure that the raw command is in the/bin directory. Some linux instances are in the/usr/bin directory.

 

Set User attributes for automatic mounting of bare devices:

 

# Vi/etc/udev/rules. d/65-raw-permissions.rules

# Set permissions of raw bindings to Oracle Clusterware devices

KERNEL = "raw1", OWNER = "root", GROUP = "oinstall", MODE = "660"

KERNEL = "raw2", OWNER = "oracle", GROUP = "oinstall", MODE = "660"

KERNEL = "raw3", OWNER = "oracle", GROUP = "oinstall", MODE = "660"

 

[Root @ node2 ~] # Vi/etc/udev/rules. d/65-raw-permissions.rules

# Set permissions of raw bindings to Oracle Clusterware devices

KERNEL = "raw1", OWNER = "oracle", GROUP = "dba", MODE = "660"

KERNEL = "raw2", OWNER = "oracle", GROUP = "dba", MODE = "660"

 

Note:

 

Note the following when using bare devices as oracle data files:

1) only one data file can be placed on a bare device.

2) the data file size can exceed the size of the bare Device

If it is a log file, the maximum available size of the raw device is-1*512 (keep a redo lock) for the raw device)

If it is a data file, the maximum available size of the bare device = the partition size of the bare device-2 * db_block_size (retain two blocks)

For the sake of simplicity, all files can be set to 1 MB smaller than bare devices.

3) it is best to set Automatic scaling for data files. If you set Automatic scaling for data files, you must set maxsize to a smaller value than bare devices.

Create and use http://www.linuxidc.com/Linux/2008-07/14349.htm of raw device in Linux System

View Cursor http://www.linuxidc.com/Linux/2014-05/101340.htm from 10046 Trace RAW File

Oracle 10g r2 installation clusterware ocr specified/dev/RAW/RAW1 error http://www.linuxidc.com/Linux/2014-02/96346.htm

Oracle uses RAW via lvm http://www.linuxidc.com/Linux/2013-04/83059.htm

Oracle RAW data type introduction http://www.linuxidc.com/Linux/2013-01/78722.htm

Redhat 5.4 RAC multipath with RAW run root. sh report Failed to upgrade Oracle Cluster Reg http://www.linuxidc.com/Linux/2012-11/75161.htm

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2014-05/102196.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.