在RHEL6.4上安装11gR2的RAC时,使用了MULTIPATH来聚合绑定多路径的磁盘,并且修改磁盘的权限,赋予grid:asmadmin用户和组。

此时,在安装时可以发现磁盘,日志如下

INFO: ... discoveryString = /dev/mapper/*
INFO: Executing [/tmp/OraInstall2014-11-24_04-55-14PM/ext/bin/kfod, nohdr=true, verbose=true, disks=all, status=true, op=disks, asm_diskstring='/dev/mapper/*']
with environment variables {XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, LANG=en_US.UTF-8, DISPLAY=:1.0, ORACLE_BASE=/oracle, PWD=/home/grid, _=/software/grid/install/.oui, ORACLE_SID=+ASM1, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, USER=grid, QTINC=/usr/lib64/qt-3.3/include, CLASSPATH=, G_BROKEN_FILENAMES=1, HOME=/home/grid, HOSTNAME=ssodb01, LESSOPEN=|/usr/bin/lesspipe.sh %s, LD_LIBRARY_PATH=/tmp/OraInstall2014-11-24_04-55-14PM/ext/bin/../lib, ORACLE_HOME=/tmp/OraInstall2014-11-24_04-55-14PM/ext/bin, LOGNAME=grid, SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass, SHELL=/bin/bash, CVS_RSH=ssh, SHLVL=2, HISTCONTROL=ignoredups, MAIL=/var/spool/mail/grid, QTDIR=/usr/lib64/qt-3.3, JAVA_HOME=, QTLIB=/usr/lib64/qt-3.3/lib, LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:, LC_ALL=, HISTSIZE=1000, TERM=xterm, PATH=/usr/bin:/usr/ccs/bin:/oracle/product/11g/grid/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/grid/bin:/software/grid/install}
INFO: Starting Output Reader Threads for process /tmp/OraInstall2014-11-24_04-55-14PM/ext/bin/kfod
INFO: Parsing 102400 CANDIDATE /dev/mapper/mpathb grid asmadmin
INFO: The process /tmp/OraInstall2014-11-24_04-55-14PM/ext/bin/kfod exited with code 0
INFO: Waiting for output processor threads to exit.
INFO: Parsing 102400 CANDIDATE /dev/mapper/mpathc grid asmadmin
INFO: Parsing 102400 CANDIDATE /dev/mapper/mpathd grid asmadmin
INFO: Parsing 102400 CANDIDATE /dev/mapper/mpathe grid asmadmin
INFO: Parsing 102400 CANDIDATE /dev/mapper/mpathf grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathg grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathh grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathi grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathj grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathk grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathl grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathm grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpathn grid asmadmin
INFO: Parsing 1024 CANDIDATE /dev/mapper/mpatho grid asmadmin

再进一步使用时,遇到错误ins-30508 invalid asm disks

INFO: Starting Output Reader Threads for process /tmp/OraInstall2014-11-24_04-55-14PM/ext/bin/kfod
INFO: Parsing KFOD-00311: Error scanning device /dev/mapper/mpathi
INFO: Parsing ORA-15025: could not open disk "/dev/mapper/mpathi"
INFO: Parsing Linux-x86_64 Error: 13: Permission denied
INFO: The process /tmp/OraInstall2014-11-24_04-55-14PM/ext/bin/kfod exited with code 0
INFO: Parsing Additional information: 42
INFO: Waiting for output processor threads to exit.
INFO: Parsing Additional information: 22608487
INFO: Parsing Additional information: 1598903119
INFO: Parsing KFOD-00311: Error scanning device /dev/mapper/mpathh
INFO: Parsing ORA-15025: could not open disk "/dev/mapper/mpathh"
INFO: Parsing Linux-x86_64 Error: 13: Permission denied
INFO: Parsing Additional information: 42
INFO: Parsing Additional information: 22608487
INFO: Parsing Additional information: 1598903119
INFO: Parsing KFOD-00311: Error scanning device /dev/mapper/mpathg
INFO: Parsing ORA-15025: could not open disk "/dev/mapper/mpathg"
INFO: Parsing Linux-x86_64 Error: 13: Permission denied
INFO: Parsing Additional information: 42
INFO: Parsing Additional information: 22608487
INFO: Parsing Additional information: 1598903119
INFO: Output processor threads exited.
SEVERE: [FATAL] [INS-30508] Invalid ASM disks.
CAUSE: The disks [/dev/mapper/mpathg, /dev/mapper/mpathh, /dev/mapper/mpathi] were not valid.
ACTION: Please choose or enter valid ASM disks.
INFO: Advice is ABORT

原来识别到的磁盘此时的权限已经发生变化。此时就需要在multipath层面对磁盘进行显示的权限属组配置。

查看Redhat 6的文档,有这么一段话,来源https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/DM_Multipath/config_file_defaults.html

As of the Red Hat Enterprise Linux 6.0 release, the mode, uid, and gid parameters have been deprecated.
Permissions for device-mapper devices (including mulitpath mappings) are set by means of udev rules.
There is a template file in /usr/share/doc/device-mapper-version called 12-dm-permissions.rules
which you can use and place in the /etc/udev/rules.d directory for it to take effect.

1、使用dmsetup ls查看确认已配置的multipath的磁盘设备

[root@ssodb01 ~]# dmsetup ls | grep mpath| sort
mpathb (253:4)
mpathc (253:2)
mpathd (253:3)
mpathe (253:5)
mpathf (253:6)
mpathg (253:8)
mpathh (253:9)
mpathi (253:7)
mpathj (253:15)
mpathk (253:10)
mpathl (253:11)
mpathm (253:13)
mpathn (253:14)
mpatho (253:12)

2、编辑文件/etc/udev/rules.d/12-dm-permissions.rules,显示配置磁盘的属组为grid:asmadmin。据文档描述,该文档的模板存在于/usr/share/doc/device-mapper-{version}/12-dm-permissions.rules。增加如下片段

ENV{DM_NAME}=="mpathb",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathc",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathd",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathe",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathf",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathg",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathh",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathi",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathj",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathk",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathl",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathm",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpathn",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="mpatho",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"

3、重启服务或刷新重载,Any way you like。

4、Restart the GI Installation Session。

How To: set udev rule for setting the disk permission on ASM disks when using multipath on Linux 6.x的更多相关文章

  1. 通过udev创建ASM共享磁盘(RAC)

    OS:RedHat EL6.0 Oracle:   Oracle 11gR2 在Oracle 11gR2,构建RAC时可以通过ASM创建asm disk,但是需要安装asmlib相关软件:对于RedH ...

  2. 转://通过udev创建ASM共享磁盘(RAC)

    OS:RedHat EL6.0 Oracle:   Oracle 11gR2 在Oracle 11gR2,构建RAC时可以通过ASM创建asm disk,但是需要安装asmlib相关软件:对于RedH ...

  3. UDEV SCSI Rules Configuration for ASM in Oracle Linux 5 and 6

    UDEV SCSI Rules Configuration for ASM in Oracle Linux 5 and 6 For Oracle Automatic Storage Manager ( ...

  4. [原]ubuntu14.04 网卡逻辑修改没有文件/etc/udev/rules.d/70-persistent-net.rules

    -----问题出现------ 在新装的ubuntu14.04系统中没有发现文件/etc/udev/rule.d/70-persistent-net.rules, 无法修改网络的逻辑名称(即把第一张网 ...

  5. (转载)使用 udev 高效、动态地管理 Linux 设备文件

    概述: Linux 用户常常会很难鉴别同一类型的设备名,比如 eth0, eth1, sda, sdb 等等.通过观察这些设备的内核设备名称,用户通常能知道这些是什么类型的设备,但是不知道哪一个设备是 ...

  6. 嵌入式 使用udev高效、动态地管理Linux 设备文件

    本文以通俗的方法阐述 udev 及相关术语的概念.udev 的配置文件和规则文件,然后以 Red Hat Enterprise Server 为平台演示一些管理设备文件和查询设备信息的实例.本文会使那 ...

  7. 【转】使用 udev 高效、动态地管理 Linux 设备文件

    简介: 本文以通俗的方法阐述 udev 及相关术语的概念.udev 的配置文件和规则文件,然后以 Red Hat Enterprise Server 为平台演示一些管理设备文件和查询设备信息的实例.本 ...

  8. linux7 udev的生效

    这篇文章主要介绍在Oracle Linux 7中如何使用udev来设置用户自定义的设备名.在Oracle Linux 7 中的设置方法与之前的Linux版本有较大差别. 下面的例子的对/dev/sdb ...

  9. 使用 udev 高效、动态地管理 Linux 设备文件

    本文转自:https://www.ibm.com/developerworks/cn/linux/l-cn-udev/index.html 概述: Linux 用户常常会很难鉴别同一类型的设备名,比如 ...

随机推荐

  1. hdu 2255奔小康赚大钱 KM算法模板

    题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=2255 一,KM算法:(借助这个题写一下个人对km的理解与km模板) KM算法主要是用来求解图的最优匹 ...

  2. 【Android】资源系列(一) -- 国际化(多语言)

    1.Android 中要实现国际化比較简单.     字符串国际化:仅仅要在 res 目录下新建相应语言的 values 目录就好了.     如.英语环境下的.目录命名为:values-en     ...

  3. Unity游戏小地图生成

    孙广东  2015.6.25 这个在AssetStore上有几个不错的插件, 除了知道原理,能自己实现还是好的. 非常多插件是不会直接使用的.而是要依据自己项目的需求进行改动或者就是自己写. 那么我们 ...

  4. algorithm库———count&&countif

    algorithm头文件定义了一个count的函数,其功能类似于find.这个函数使用一对迭代器和一个值做参数,返回这个值出现次数的统计结果. 编写程序读取一系列int型数据,并将它们存储到vecto ...

  5. bzoj1997 [Hnoi2010]Planar——2-SAT

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1997 神奇的经典2-SAT问题! 对于两个相交的区间,只能一里一外连边,所以可以进行2-SA ...

  6. Kafka VS Flume

     (1)kafka和flume都是日志系统.kafka是分布式消息中间件,自带存储,提供push和pull存取数据功能.flume分为agent(数据采集器),collector(数据简单处理和写入) ...

  7. App上架流程 & 上架被拒10大原因

    上架前预热 先登陆自己的开发者账号(自己提前注册好 iOS 开发者账号,这里假设你已经拥有了一个 iOS 开发者账号),进入这个页面:https://developer.apple.com/accou ...

  8. 【转载】基于AFNetWorking3.0的图片缓存分析

    原文出处: Yasin的简书 理论 不喜欢理论的可以直接跳到下面的Demo实践部分 缓存介绍 缓存按照保存位置可以分为两类:内存缓存.硬盘缓存(FMDB.CoreData…).我们常说的网络请求缓存包 ...

  9. hibernate基础简单入门1---helloword

    1:目录结果 2:实体类(student.java) package com.www.entity; public class Student { private int id; private St ...

  10. PHPExcel读取文件日期处理,含时分秒(Thinkphp)

    我们使用PHPExcel读取excel文件后发现,时间都是类似于这样的数字:41890.620138889,那么如何将它处理成我们想要的2014-09-08 14:53:00这样格式的日期呢,看代码: ...