david0341 发表于 2013-1-29 22:29:50

linux系统multipath(Device Mapper)下安装RAC注意事项

<span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5  修改时间 24-JAN-2010     类型 HOWTO     状态 PUBLISHED In this Document
  Goal
  Solution
     Deprecation of Support for Raw Devices
     A Bit About Udev and Device Name Persistency
     Multipath, Raw and Udev
     Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5
     Assumptions
     1. Configure SCSI_ID to Return Unique Device Identifiers
     1a. Whitelist SCSI devices
     1b. List all SCSI (Clusterware) devices
     1c. Obtain Clusterware device unique SCSI identifiers
     2. Configure Multipath for Persistent Naming of Clusterware Devices
     2a. Configure Multipathing
     2b. Verify Multipath Devices
     3. Create Raw Devices
     4. Test Raw Device Accessibility
     5. Script Creation of Raw Bindings and Permissions
     6. Test the Raw Device Script
     7. Install Oracle 10gR2 Clusterware
  References

 
 
Applies to:

Linux OS - Version: 5.0 to 5.0
Linux x86
Linux x86-64
Linux Itanium
Linux Kernel - Version: 5.0 to 5.0Goal

This article is intended for Oracle on Linux Database and System Administrators, particularly those intending to install (or migrate to) Oracle Real Application Clusters 10g Release 2 (10.2.0) on Red Hat/Oracle Enterprise Linux 5 (EL5). The article is intended to focus on the configuration of raw devices against multipathed devices on EL5 in preparation for RAC Clusterware usage, rather than on multipathing or installation of the Clusterware.

Examples were taken from a working system of the following configuration:

[*]Enterprise Linux 5 (GA) - 2.6.18-8.el5
[*]Oracle Clusterware 10g Release 2 (10.2.0)
[*]Shared storage for Clusterware files served via iSCSI
Note: this document differs to Note.465001.1 that describes configuration of raw devices against single pathed devices. This Note describes configuration of raw devices against multipathed devices.

Solution

Deprecation of Support for Raw Devices

In versions prior to EL5, applications such as Oracle, could access unstructured data on block devices by binding to them via character raw devices, such as/dev/raw/raw1 using the raw(8) command. Persistent device assignments could be configured using the /etc/sysconfig/rawdevices file in conjunction with therawdevices service.
Support for raw devices was initially deprecated in the Linux 2.6 kernel (EL5 < U4) in favour of directio (O_DIRECT) access, however was later undeprecated from EL5 U4 (initscripts-8.45.30-2). 

For details of the deprecation and undeprecation of support for rawio, refer to Linux kernel/version documentation including:

[*]/usr/share/doc/kernel-doc-2.6.18/Documentation/feature-removal-schedule.txt
[*]Red Hat Enterprise Linux 4/5 Release notes
Both the /etc/sysconfig/rawdevices file (EL4) and /etc/udev/rules.d/60-raw.rules file (EL5) similarly discuss deprecation of raw.

OCFS2, Oracle's Cluster Filesystem version 2 (http://oss.oracle.com/projects/ocfs2), is an extent based, POSIX-compliant file system that provides for shared, O_DIRECTfile access. For certified ports and distributions, Oracle extends free support of OCFS2 users with an Oracle database license for use in storing Oracle datafiles, redologs, archivelogs, control files, voting disk (CRS), cluster registry (OCR), etc. along with shared Oracle home.
A Bit About Udev and Device Name Persistency

Unlike devlabel in the 2.4 kernel, udev (the 2.6 kernel device file naming scheme) dynamically creates device file names at boot time. This can, however, give rise to the possibility that device file names may change - a device that may once have been named /dev/sdd say, may be named /dev/sdf, say, after reboot. Without specific configuration, if udev is left to dynamically name devices, the potential exists for devices referred to, or inadvertently accessed by, their arbitrary kernel-assigned name (e.g. Oracle Clusterware files; Cluster Registry, Voting disks, etc.) to become corrupt.
Multipath, Raw and Udev

The necessity for high availability access to storage is well understood. For singlepath environments, raw devices can easily be configured via udev rules as described inNote.465001.1. For multipath environments, however, configuration of raw devices against multipathed devices via udev is more complex. In fact, significant modification of default udev rules can introduce issues with supportability. Therefore, other means are recommended to achieve configuration of raw devices against multipathed devices with multipath device naming persistency.

Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5

The following procedure outlines the steps necessary to configure persistent multipath device naming and creation of raw devices (including permissions) in preparation for Oracle 10gR2 (10.2.0) Clusterware devices. From Oracle11g Release 1 (11.1.0), Clusterware files may be placed on either block or raw devices located on shared disk partitions, therefore the following procedure only strictly applies when using Oracle 10gR2 (10.2.0) and multipathing.

Therefore, take this opportunity to consider whether you wish to proceed using 10gR2 or 11gR1 Clusterware to manage your 10gR2 databases - multipath device configuration for Oracle 11g Clusterware is described in Note 605828.1. The following procedure may also be used as a basis for configuring raw devices on EL4 (Update 2 or higher). Unless otherwise stated, all steps should be performed on each cluster node and as a privileged user.
Assumptions

The following procedure assumes the following to have occured:

[*]Clusterware devices have been created on supported shared storage
[*]Clusterware devices have been appropriately sized according to Oracle10g Release 2 (10.2.0) RAC documentation
[*]Clusterware devices have been partitioned
[*]All cluster nodes have multipath access to shared devices
[*]Cluster nodes are configured to satisfy Oracle Universal Installer (OUI) requirements

1. Configure SCSI_ID to Return Unique Device Identifiers

1a. Whitelist SCSI devices

Before being able to configure udev to explicitly name devices, scsi_id(8) should first be configured to return SCSI device identifiers. Modify the/etc/scsi_id.config file - add or replace the option=-b parameter/value pair (if exists) with option=-g, for example:

<div style="background-color: #eef3f7; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; margin-top: 5px; width: 941px; padding: 0.5em; border: 1px solid #c4d1e6;" class="kmcodeblock"># grep -v ^# /etc/scsi_id.config
vendor="ATA",options=-p 0x80
options=-g
页: [1]
查看完整版本: linux系统multipath(Device Mapper)下安装RAC注意事项