Configuring Raw Devices on Red Hat Enterprise Linux 4.0

来源:互联网 发布:站长工具网站源码 编辑:程序博客网 时间:2024/05/22 10:39

Configuring Raw Devices on Red Hat Enterprise Linux 4.0 If you intend to use raw devices for Oracle Clusterware or Oracle Database files, then you need to configure the raw devices.Starting with the 2. 6 Linux kernel distributions, raw devices are not supported by default in the kernel.However, Red Hat Enterprise Linux 4.0 continues to provide raw support. To confirm that raw devices are enabled, enter the following command: # chkconfig --list Scan the output for raw devices. If you do not find raw devices, then use the following command to enable the raw device service: # chkconfig --level 345 rawdevices on After you confirm that the raw devices service is running, you should change the default ownership of raw devices. When you restart a Red Hat Enterprise Linux 4.0 system, ownership and permissions on raw devices revert by default to root. If you are using raw devices with this operating system for your Oracle files (for example, for ASM storage or Oracle Clusterware files), then you need to override this default behavior. In this section, we will use the scenario of two ASM disk files (/dev/raw/raw6and/dev/raw/raw7), two Oracle Cluster Registry files (/dev/raw/raw1and/dev/raw/raw2), and three Oracle Clusterware voting disks (/dev/raw/raw3,/dev/raw/raw4, and/dev/raw/raw5). To ensure correct ownership of these devices when the operating system is restarted, create a new file in the/etc/udev/permissions.ddirectory, calledoracle.permissions, and enter the raw device permissions information. Note that Oracle Clusterware software can be owned either by the same user that owns the Oracle database software (typicallyoracle), or can be owned by a separate Oracle Clusterware user. If you create a separate Oracle Clusterware user, then that user must own the voting disks. This example shows the permissions to be set if you use a separate Oracle Clusterware user, namedcrs, and the Oracle user is namedoracle. The ASM disks should be owned byoracle, and the voting disks owned bycrs. The Oracle Cluster Registry (OCR) is always owned by root.With the scenario for this section, the following is an example of the contents of/etc/udev/permissions.d/oracle.permissions: # ASMraw/raw[67]:oracle:dba:0660 # OCRraw/raw[12]:root:oinstall:0640 # Voting Disksraw/raw[3-5]:crs:oinstall:0640 Note that path lines can use the shellglobmodule, so entries such asraw/raw[3-4]orraw/raw*are permitted. Refer to your operating system help for character range usage. After creating theoracle.permissionsfile, the permissions of therawdevicesfiles are set automatically the next time the system is restarted.To set permissions to take effect immediately, without restarting the system, use thechownandchmodcommands: chown oracle:dba /dev/raw/raw[67]chmod 660 /dev/raw/raw[67]chown root:oinstall /dev/raw/raw[12]chmod 640 /dev/raw/raw[12]chown crs:oinstall /dev/raw/raw[3-5]chmod 640 /dev/raw/raw[3-5]