码迷,mamicode.com
首页 > 移动开发 > 详细

How to create Oracle ASM devices using device-mapper multipath devices in Red Hat Enterprise Linux 6

时间:2014-12-23 11:51:47      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:

How to create Oracle ASM devices using device-mapper multipath devices in Red Hat Enterprise Linux 6?

环境

    Red Hat Enterprise Linux 6
    Device-Mapper Multipath (DM Multipath)
    Oracle ASM
    Udev

决议

    Please use the following steps to create Oracle ASM disks with dm-multipath on RHEL 6 systems:

    Determine the DM_UUID value for each multipath device that is required to be used for Oracle ASM. You could use following command for the same:

    $ udevadm info --query=all --name=/dev/mapper/mpathN |grep -i DM_UUID

    Please replace mpathN in above command with name of the multipath devices used in your setup/environment.

    The output of above command would be similar to the one shown below:

    $ udevadm info --query=all --name=/dev/mapper/mpathd|grep -i DM_UUID
    E: DM_UUID=mpath-1234567890abcdefghijklmnopqrstuvwxyz

    Above command would be required to be repeated for each multipath device to be used with Oracle ASM, and please note down the DM_UUID value retrieved for each multipath device. This value would be used to create udev rule.

    Create a udev rule file /etc/udev/rules.d/96-asmmultipath.rules and add a udev rule for each multipath device using it‘s DM_UUID value:

    ACTION=="add|change", ENV{DM_UUID}=="mpath-<UUID>", SYMLINK+="oracleasm/asm01", GROUP="dba", OWNER="oracle", MODE="0660"

    e.g. to create Oracle ASM disk /dev/oracleasm/asm01 using above multipath device mpathd following udev rule could be used:

    $ cat /etc/udev/rules.d/96-asmmultipath.rules
    ACTION=="add|change", ENV{DM_UUID}=="mpath-1234567890abcdefghijklmnopqrstuvwxyz", SYMLINK+="oracleasm/asm01", GROUP="dba", OWNER="oracle", MODE="0660"

    Note that we have replaced mpath-<UUID> in above rule with the DM_UUID retrieved in step [1]. Similarly a udev rule for each multipath device would be required to be appended in /etc/udev/rules.d/96-asmmultipath.rules file.

    You could also modify Symlink path (e.g. oracleasm/asm01 in above udev rules), Group, Owner permissions as per requirement.

    Reload the udev service for the changes to take effect and create the ASM disks.




How to create Oracle ASM devices using device-mapper multipath devices in Red Hat Enterprise Linux 6

标签:

原文地址:http://www.cnblogs.com/djinmusic/p/4179643.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!