이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 13. Configuring I/O for Raw Partitions


13.1. General

Raw partitions allow Oracle to bypass the OS cache. A raw device can be assigned or bound to block devices such as disk or disk partitions. When a raw device is bound to a disk, any read or write access to the raw device will perform a raw I/O with the disk. A raw I/O through the /dev/raw interface bypasses the kernel's block buffer cache entirely that is normally associated with block devices and goes right to the low level device itself. By bypassing the cache it accesses a physical device directly which allows applications such as Oracle databases to have more control over the I/O to the physical device. In fact, Oracle does it is own data caching and raw devices allow Oracle to ensure that data gets written to the disk immediately without OS caching.
Since Automatic Storage Management (ASM) is the recommended option for large amounts of storage in RAC environments, the focus of this article and section is on the usage of raw devices and block devices for ASM. ASM offers many advantages over conventional file systems. The ASM file system is not buffered and supports asynchronous I/O. It allows you to group sets of physical disks to logical entities as disk groups. You can add or remove disks without downtime. In fact, you could move a whole database from one SAN storage to another SAN without downtime. ASM spreads I/O over all the available disks automatically to avoid hot spots. ASM does also it is own striping and offers mirroring. ASM can be setup using the ASM library driver or raw devices. Starting with 10g R2, neither is necessarily required.

Note

Raw I/O was briefly deprecated by the Linux community, so Oracle 10g R2 no longer requires raw devices for the database. Oracle 10g R2 automatically opens all block devices such as SCSI disks using the O_DIRECT flag, thus bypasses the OS cache. Support for raw devices was reinstated in Red Hat Enterprise Linux 5.4 and later.
For older Oracle Database and Red Hat Enterprise Linux versions raw devices are still a recommended option for ASM and data files, and remain supported. For more information on using block devices, see Section 13.4, “Using Block Devices for Oracle 10g Release 2 in Red Hat Enterprise Linux 4 and 5”. Unfortunately, Oracle Clusterware R2 OUI still requires raw devices or a Cluster File System.

Warning

The name of the devices are assigned by the Linux and is determined by the scan order of the bus. Therefore, the device names are not guaranteed to persist across reboots. For example, SCSI device /dev/sdb can change to /dev/sda if the scan order of the controllers is not configured. To force the scan order of the controllers, aliases can be set in /etc/modprobe.conf. For example:
alias scsi_hostadapter1 aic7xxx
Copy to Clipboard Toggle word wrap
alias scsi_hostadapter2 lpfc
Copy to Clipboard Toggle word wrap
These settings will guarantee that the Adaptec adapter for local storage is used first and then the Emulex adapter(s) for SAN storage. Fortunately, Red Hat Enterprise Linux 4 and 5 have already addressed this issue by delaying the loading of lpfc (Emulex) and various qla (QLogic) drivers until after all other SCSI devices have been loaded. This means that the alias settings in this example would not be required in Red Hat Enterprise Linux 4 and 5. For more information, see Red Hat Enterprise Linux AS 4 Release Notes. Be also careful when adding/removing devices which can change device names on the system. Starting Oracle with incorrect device names or raw devices can cause permanent damage to the database. For stable device naming in Linux 2.4 and 2.6, see Optimizing Linux I/O.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동