Knowledge of Oracle Bare devices

Source: Internet
Author: User
Tags file system backup

A bare device, also called a bare partition (raw partition), is a special character device that is not formatted and is not read by UNIX through a file system. This article collects the bare devices and Oracle Quiz 20 cases.

1. What is called the naked device?

A bare device, also called a bare partition (raw partition), is a special character device that is not formatted and is not read by UNIX through a file system. It is the responsibility of the application to read and write it. Does not pass the file system buffer.

2. How to identify the bare equipment?

In the Unix/dev directory, there are a number of files, including two large classes: Character device files and block device files.

Character device special files I/O operations do not go through the operating system's buffer, and the block device special files are used for fixed-length packet transmission with the peripherals. Character special files and peripherals I/O operations are transmitted only one character at a time. And for the block device special file, it uses the cache mechanism, between the peripheral and memory can transmit a whole block of data. The bare devices use character special files. You can see many of these files in the/dev directory.

3. Advantages of using bare equipment

Because the use of bare devices to avoid another layer of UNIX operating system, data directly from disk to Oracle transmission, so the use of raw devices for read and write frequent database applications, can greatly improve the performance of the database system. Of course, this is only true if disk I/O is very large and disk I/O is already known as a system bottleneck. If the disk reads and writes are very frequent, so that disk reads and writes become the system bottleneck, then the use of bare devices can significantly improve performance, the maximum can be increased to 40%, very obvious.

Moreover, because the use of the original partition, no file system management, for UNIX maintenance of the file system is not the cost, such as no longer maintain i-node, free block, etc., which can also lead to improved performance.

4. How do you decide if you should use bare devices?

To determine whether to use a bare device is to consider the following: first, the database system itself needs to have been better optimized. Optimization is a very technical topic, it is difficult to simply tell. Second, use UNIX commands to identify disk read/write bottlenecks. such as Unix Vmstat, SAR and other commands can be better to identify. If you decide to adopt a bare device, you need a free partition on the disk. Otherwise, new disks will be added, or the original system should be redesigned.

5. What systems must use bare devices?

If you use the Oracle Parallel server option, you must use a bare device to store all the data files, control the files, and redo the log files. It is only possible to put these files on a bare device to ensure that all Oracle instances can read the database files. This is determined by the characteristics of the UNIX operating system.

In another case, if you want to use asynchronous I/O, you must also use a bare device on some UNIX. This requires reference to specific UNIX-related documentation.

6. Is it possible to use the first partition of a disk as a bare device?

OK, but not recommended. The older version of UNIX is the bank, where the first partition of the disk often contains some information about the disk and some control information about the logical volume. If these parts are covered by a bare device, the disk becomes unrecognizable, causing the system to crash.

This is not the case with newer versions of UNIX because they employ more sophisticated techniques to manage disk, and some information about logical volumes. However, unless you are confident that you do not use the first partition of the disk as a raw device.

7. Can I use the entire raw device as an Oracle data file?

No way. The size of the data file must be slightly smaller than the actual size of the raw device. At least two Oracle blocks should be empty.

8. Should the raw device belong to that user?

The bare device should be created by root and then assigned to an Oracle user for use. It also has to be included in the same group as the Oracle user (usually DBAs).

9. How do I specify a bare device when creating data files?

and ordinary files are not much different, the same is in single quotes inside the bare device to write the detailed path to it. As an example: to create a tablespace, using two bare devices, each 30m size, the size of the Oracle block is 4k, you can use the following command:

Create Tablespace Raw_ts

DataFile '/dev/raw1 ' size 30712k

DataFile '/dev/raw2 ' size 30712k;

Does the size of the 10.oracle block have anything to do with the bare device?

The Oracle block must be a multiple of the physical block size on the bare device.

11. How to make a backup on a bare device?

On a bare device, you cannot use the Unix utility for backup, the only way is to use the most basic UNIX command: DD for backup. For example: DD if=/dev/raw1 of=/dev/rmt0 bs=16k. The specific syntax for DD can refer to the UNIX manual or online Help. You can also use DD to back up data files on your bare devices to disk, and then use the UNIX utility to further process them.

12. If I am not using the Oracle Parallel server option, can I have some data files on the database using the file system and the other part using bare devices?

OK. However, this can complicate the backup process.

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.