ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 安装clusterware报告对裸设备没有操作权限

安装clusterware报告对裸设备没有操作权限

原创 Linux操作系统 作者:myownstars 时间:2011-07-12 11:19:14 0 删除 编辑

Redhat5取消了对raw devices的支持(不过5.5又重新支持了),所以在redhat 5.5上刚安装的时候选择/etc/udev/rules.d/60-raw.rules作为配置文件

[root@rac1 ~]# vi /etc/udev/rules.d/60-raw.rules

 

# Enter raw device bindings here.

#

# An example would be:

#   ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"

# to bind /dev/raw/r aw1 to /dev/sda, or

#   ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"

# to bind /dev/raw/raw2 to the device with major 8, minor 1.

ACTION=="add", KERNEL=="/dev/sdc1",RUN+="/bin/raw /dev/raw/raw1 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="33",RUN+="/bin/raw /dev/raw/raw1 %M %m"

ACTION=="add", KERNEL=="/dev/sdd1",RUN+="/bin/raw /dev/raw/raw2 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="49",RUN+="/bin/raw /dev/raw/raw2 %M %m"

ACTION=="add", KERNEL=="/dev/sde1",RUN+="/bin/raw /dev/raw/raw3 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="65",RUN+="/bin/raw /dev/raw/raw3 %M %m"

ACTION=="add", KERNEL=="/dev/sdf1",RUN+="/bin/raw /dev/raw/raw4 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="81",RUN+="/bin/raw /dev/raw/raw4 %M %m"

ACTION=="add", KERNEL=="/dev/sdg1",RUN+="/bin/raw /dev/raw/raw5 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="97",RUN+="/bin/raw /dev/raw/raw5 %M %m"

ACTION=="add", KERNEL=="/dev/sdh1",RUN+="/bin/raw /dev/raw/raw6 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="113",RUN+="/bin/raw /dev/raw/raw6 %M %m"

ACTION=="add", KERNEL=="/dev/sdi1",RUN+="/bin/raw /dev/raw/raw7 %N"

ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="129",RUN+="/bin/raw /dev/raw/raw7 %M %m"

KERNEL=="raw[1-7]", WNER="oracle", GROUP="oinstall", MODE="640" [root@rac1 ~]# start_udev

Starting udev: [  OK  ]

注:将/dev/mapper/ocr1p2之类分区作为kernel加入,在/dev/raw下面不会出现raw1

        通过 Fdisk –l找出新加载的lun及其major/minor

总之,这种配置比起rawdevices,个人感觉操作上麻烦很多。

……..

 

 在安装clusterware的时候报告如下错误:

 

 

The specified shared raw partition /dev/raw/raw3 may not have correct permission. Verify that the partition is owned by Oracle user.

 

对裸设备没有操作权限 可是刚刚查看过 相应的设备的owner都是oracle

 

为了解决这个错误,前后耗时近5个小时

 

最后发现一点端倪

bash-3.2$ dd if=/dev/zero f=/dev/raw/raw3 bs=1M count=256

dd: opening `/dev/raw/raw3': Device or resource busy

注:此时的/dev/raw/raw*是通过udev配置指向/dev/sd*设备的,具体的见上文/etc/udev/rules.d/60-raw.rules

google了一大堆,均无正解

最后尝试了一下/dev/mapper下的设备,居然可以

bash-3.2$ dd if=/dev/zero f=/dev/mapper/ocr1p1 bs=1M count=256

256+0 records in

256+0 records out

268435456 bytes (268 MB) copied, 23.0606 seconds, 11.6 MB/s

于是决定放弃udev,还是采用rawdevices来影射LUN,上述问题解决

 

 

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

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

注册时间:2010-03-18

  • 博文量
    375
  • 访问量
    3164480