Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1975243
  • 博文数量: 346
  • 博客积分: 10221
  • 博客等级: 上将
  • 技术积分: 4079
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-01 19:43
文章分类

全部博文(346)

文章存档

2012年(1)

2011年(102)

2010年(116)

2009年(127)

我的朋友

分类: Oracle

2011-05-25 23:44:11

自动挂载裸设备
方法一: OEL5
vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
/dev/raw/raw3 /dev/sdb3
/etc/init.d/rawdevices status/restart/...


方法二: OEL5/redhat5下


vi /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sde1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw3 %N"


启动后权限
vi /etc/udev/rules.d/65-raw-permissions.rules
# Set permissions of raw bindings to Oracle Clusterware devices
KERNEL=="raw1", WNER="oracle", GROUP="oinstall", MODE="660"
KERNEL=="raw2", WNER="oracle", GROUP="oinstall", MODE="660"
KERNEL=="raw3", WNER="oracle", GROUP="oinstall", MODE="660"



资料:
Redhat 5 以上版本已经取消了对裸设备的支持,所以在安装 Oracle RAC 时所使用的的裸设备,需要通过 Udev 进行设置:

设置重新启动自动挂载裸设备
vi /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sde1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw3 %N"

注意确定raw命令在/bin目录下,有的linux是在/usr/bin目录下

vi /etc/udev/rules.d/65-raw-permissions.rules
# Set permissions of raw bindings to Oracle Clusterware devices
KERNEL=="raw1", WNER="root", GROUP="oinstall", MODE="660"
KERNEL=="raw2", WNER="oracle", GROUP="oinstall", MODE="660"
KERNEL=="raw3", WNER="oracle", GROUP="oinstall", MODE="660"

以上方法也适用其他使用udev挂载设备的linux版本.

具体请参考 Oracle 官方文档:

Note 465001.1
- Configuring raw devices (singlepath) for Oracle Clusterware10gRelease 2 (10.2.0) on RHEL5/ OEL5






missing folder /etc/udev/permissions.d 
Posted: 2008-1-13 下午5:23    in response to: user611755
Reply
Hi,

What kind of OS are you running ? Please upload the output of "uname -a".
If you are using EL5/RHEL5, that's right. You can't find the folder /etc/udev/permissions.d. Please follow the following steps:

1. Add udev permission rules to /etc/udev/rules.d/65-raw-permissions.rules file
2. Add the udev permission rules to the /etc/udev/rules.d/65-raw-permissions.rules file, for example:
# Set permissions of raw bindings to Oracle Clusterware devices
KERNEL=="raw1", WNER="root", GROUP="oinstall", MODE="640"
KERNEL=="raw2", WNER="oracle", GROUP="oinstall", MODE="640"
阅读(3218) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~