ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to Bind RAW devices to Physical Partitions on Linux to be used by ASM

How to Bind RAW devices to Physical Partitions on Linux to be used by ASM

原创 Linux操作系统 作者:ilsyx 时间:2011-08-19 12:43:28 0 删除 编辑

个人总结


此文是raw设备映射的操作.要注意的是在一个硬盘上直接划分分区最大只能划14个.

How to Bind RAW devices to Physical Partitions on Linux to be used by ASM [ID 458419.1]

  Modified 18-AUG-2011     Type HOWTO     Status PUBLISHED  

In this Document
  Goal
  Solution


Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.6 - Release: 10.1 to 11.1
Linux x86
Linux x86-64

Goal

This document explains step by step how to bind raw partitions on Linux to be used by ASM.

Solution

You can bind the raw partitions in the following way to make sure the bound is persistent during each reboot:

1) Open the /etc/sysconfig/rawdevices file in any text editor, and add a line similar to the following for each partition that you created and you want to bound:

# Specify an unused raw device for each partition.
/dev/raw/raw1 /dev/sda1
/dev/raw/raw2 /dev/sda2
/dev/raw/raw3 /dev/sda3
/dev/raw/raw4 /dev/sda4
/dev/raw/raw5 /dev/sda5
/dev/raw/raw6 /dev/sda6
/dev/raw/raw7 /dev/sda7
/dev/raw/raw8 /dev/sda8
/dev/raw/raw9 /dev/sda9
/dev/raw/raw10 /dev/sda10
/dev/raw/raw11 /dev/sda11

2) For the raw device that you created for ASM, enter commands similar to the following to set the owner, group, and permissions on the device file:

# chown oracle:oinstall /dev/dev/rawn
# chmod 640 /dev/raw/rawn


3) For each additional raw device that you specified in the rawdevices file, enter commands similar to the following to set the owner, group, and permissions on the device file:

# chown oracle:oinstall /dev/dev/rawn
# chmod 640 /dev/raw/rawn

4) To bind the partitions to the raw devices, enter the following command:

# /sbin/service rawdevices restart

By editing the rawdevices file, the system binds the partitions to the raw devices when it reboots.

5) Now you will be able to see the raw partitions thru the ASM instance:
========================================================
dbaasm.us.oracle.com:+ASM:oracle:11g>export ORACLE_SID=+ASM
dbaasm.us.oracle.com:+ASM:oracle:11g>sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Sep 12 17:30:57 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select path from v$asm_disk;

PATH
--------------------------------------------------------------------------------
/dev/raw/raw1
/dev/raw/raw2
/dev/raw/raw3
/dev/raw/raw4
/dev/raw/raw5
/dev/raw/raw6
/dev/raw/raw7
/dev/raw/raw8
/dev/raw/raw9
/dev/raw/raw10
/dev/raw/raw11

11 rows selected.
========================================================



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-705337/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-06-12

  • 博文量
    194
  • 访问量
    596624