ITPub博客

首页 > 数据库 > Oracle > RAC_UDEV的99-oracle-asmdevices.rules配置方法

RAC_UDEV的99-oracle-asmdevices.rules配置方法

Oracle 作者:swq618 时间:2018-05-08 19:08:29 0 删除 编辑
wwid为3600c0ff0001001cd78cdaa4e02000000的分区1对应来对应/dev/udev1,分区2对应/dev/udev2,分区3对应/dev/udev3

如果配置中OWNER="grid", GROUP="asmadmin",则必须给oracle用户也加上asmadmin权限,usermod -a -G asmadmin oracle

按分区来
LINUX 5的/etc/udev/rules.d/99-oracle-asmdevices.rules配置(/block/$parent)
KERNEL=="sda1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /block/$parent", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev1", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sda2", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /block/$parent", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev2", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sda3", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /block/$parent", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev3", OWNER="grid", GROUP="oinstall", MODE="0660"

LINUX 6的/etc/udev/rules.d/99-oracle-asmdevices.rules配置(/dev/$parent)
KERNEL=="sda1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev1", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sda2", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev2", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sda3", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev3", OWNER="grid", GROUP="oinstall", MODE="0660"





按磁盘来(%p)
LINUX 5 
LINUX 6
/etc/udev/rules.d/99-oracle-asmdevices.rules配置都可如下

KERNEL=="sda", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev", OWNER="grid", GROUP="asmadmin", MODE="0660"

LINUX 6也可单独如下(/dev/$name)
echo "options=--whitelisted --replace-whitespace"  >> /etc/scsi_id.config
KERNEL=="sda", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600c0ff0001001cd78cdaa4e02000000", NAME="udev", OWNER="grid", GROUP="asmadmin", MODE="0660"

ORACLE官方故障文档推荐如下(%p)
How To Setup Partitioned Linux Block Devices Using UDEV (Non-ASMLIB) And Assign Them To ASM? (文档 ID 1528148.1)
[root@asmlnx2 ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="xv*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="360a98000375331796a3f434a55354474", NAME="asmdisk1_udev_p1", ACTION=="add|change", OWNER="grid", GROUP="asmadmin", MODE="0660"






$parent指KERNEL值中的父节点设备
%p is the path for the current device

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

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

注册时间:2014-05-24

  • 博文量
    104
  • 访问量
    253762