How To: set udev rule for setting the disk permission on ASM disks when using multipath on Linux 6.x
在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的更多相关文章
- 通过udev创建ASM共享磁盘(RAC)
OS:RedHat EL6.0 Oracle: Oracle 11gR2 在Oracle 11gR2,构建RAC时可以通过ASM创建asm disk,但是需要安装asmlib相关软件:对于RedH ...
- 转://通过udev创建ASM共享磁盘(RAC)
OS:RedHat EL6.0 Oracle: Oracle 11gR2 在Oracle 11gR2,构建RAC时可以通过ASM创建asm disk,但是需要安装asmlib相关软件:对于RedH ...
- 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 ( ...
- [原]ubuntu14.04 网卡逻辑修改没有文件/etc/udev/rules.d/70-persistent-net.rules
-----问题出现------ 在新装的ubuntu14.04系统中没有发现文件/etc/udev/rule.d/70-persistent-net.rules, 无法修改网络的逻辑名称(即把第一张网 ...
- (转载)使用 udev 高效、动态地管理 Linux 设备文件
概述: Linux 用户常常会很难鉴别同一类型的设备名,比如 eth0, eth1, sda, sdb 等等.通过观察这些设备的内核设备名称,用户通常能知道这些是什么类型的设备,但是不知道哪一个设备是 ...
- 嵌入式 使用udev高效、动态地管理Linux 设备文件
本文以通俗的方法阐述 udev 及相关术语的概念.udev 的配置文件和规则文件,然后以 Red Hat Enterprise Server 为平台演示一些管理设备文件和查询设备信息的实例.本文会使那 ...
- 【转】使用 udev 高效、动态地管理 Linux 设备文件
简介: 本文以通俗的方法阐述 udev 及相关术语的概念.udev 的配置文件和规则文件,然后以 Red Hat Enterprise Server 为平台演示一些管理设备文件和查询设备信息的实例.本 ...
- linux7 udev的生效
这篇文章主要介绍在Oracle Linux 7中如何使用udev来设置用户自定义的设备名.在Oracle Linux 7 中的设置方法与之前的Linux版本有较大差别. 下面的例子的对/dev/sdb ...
- 使用 udev 高效、动态地管理 Linux 设备文件
本文转自:https://www.ibm.com/developerworks/cn/linux/l-cn-udev/index.html 概述: Linux 用户常常会很难鉴别同一类型的设备名,比如 ...
随机推荐
- CentOS7安装MariaDB成功的实践
前言 在自己的VPS的CentOS7安装Oracle的Mysql失败以后,我又开始找CentOS7上面安装MariaDB的方法,于是我找打了这篇文章:http://blog.csdn.net/defa ...
- webrtc 视频 demo
webrtc 视频 demo webrtc网上封装的很多,demo很多都是一个页面里实现的,今天实现了个完整的 , A 发视频给 B A webrtc.html作为offer <!DOCTYPE ...
- iOS----四方块 动画button实现
突然想起来上一次面试考官提问的一个问题:怎样创建一个菱形,并让它对应单击事件.能够开合的效果. 当时第一反应使用button来填充菱形的图片来实现,只是考官说,这样点击的区域不够灵敏,毕竟button ...
- 在oracle中操作表及字段注释,查询一个表的所有字段名以及属性和约束
1.查询表注释 SELECT * FROM USER_TAB_COMMENTS; 三列:TABLE_NAME,TABLE_TYPE,COMMENTS 2.查询字段注释 SELECT * FROM US ...
- bzoj 1601 灌水
题目大意: 决定把水灌到n块农田,农田被数字1到n标记 把一块土地进行灌水有两种方法,从其他农田饮水,或者这块土地建造水库 建造一个水库需要花费wi,连接两块土地需要花费Pij. 计算所需的最少代价 ...
- 洛谷P3402 最长公共子序列
题目背景 DJL为了避免成为一只咸鱼,来找Johann学习怎么求最长公共子序列. 题目描述 经过长时间的摸索和练习,DJL终于学会了怎么求LCS.Johann感觉DJL孺子可教,就给他布置了一个课后作 ...
- bzoj1061&&bzoj3256
http://www.lydsy.com/JudgeOnline/problem.php?id=1061 单纯形... 先开始我不知道对偶,看着代码不知所措,并不能懂他们写的是什么... 单纯形的标准 ...
- Java经典算法之选择排序(Select Sort)
思路:就是把所有数据项扫描一遍,挑出最小的那个和最左边的交换位置,即放到0位置.现在最左边的就是有序得了,不需要在交换位置,再次扫描数据时就是从1开始,还是寻找最小的和1交换位置,直到所有数据都是有序 ...
- idea 内测设置
找到安装目录/bin/idea64.exe.vmoptions文件 下面是默认配置 -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseC ...
- linux top 的用法
本篇博文主要讲解有关top命令,top命令的主要功能是查看进程活动状态以及一些系统状况. TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终 ...