安裝clusterware報告對裸裝置沒有操作許可權

myownstars發表於2011-07-12

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章