RAC存储多路径绑定

rpm -ivh device-mapper-multipath-libs-0.4.9-72.el6.x86_64.rpm
rpm -ivh device-mapper-multipath-0.4.9-72.el6.x86_64.rpm

cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc
编辑/etc/multipath.conf
注释掉默认打开的defaults(3行数据)
打开其他defaults
添加黑名单,将本地磁盘加入黑名单
blacklist {
#       wwid 26353900f02796769
#       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
#       devnode "^hd[a-z]"
        devnode "^sd[a-b]"
}

运行:
modprobe dm-multipath
modprobe dm-round-robin

/etc/init.d/multipathd restart
service multipathd restart
multipath -v2

multipath -ll
scsi_id -g -u  /dev/sdb
36006016011c04500ef4e958b20d4e711
3600601600bc0450079272985cc9de711
然后编辑/etc/multipath.conf
命名格式化共享磁盘

RAC:
multipaths{
     multipath{
      wwid   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      alias    "ocrvote1"
      path_grouping_policy    multibus
      }
     multipath{
      wwid   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      alias    "ocrvote2"
      path_grouping_policy    multibus
      }
     multipath{
      wwid   "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
      alias    "ocrvote3"
      path_grouping_policy    multibus
      }
     multipath{
      wwid   "XXXXXXXXXXXXXXXXXXXXXXXXXX"
      alias    "data1"
      path_grouping_policy    multibus
      }
   multipath{
      wwid   "3600601600bc045008b07592bc79de711"
      alias    "redo"
      path_grouping_policy    multibus
      }
   multipath{
      wwid   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      alias    "arch"
      path_grouping_policy    multibus
      }
   multipath{
      wwid   "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      alias    "recover"
      path_grouping_policy    multibus
      }
}


添加权限:(目前权限为root disk )

udev 绑定:
BPM:
cd /dev/mapper
for i in ls *; do
printf "%s %s\n" "$i" "$(udevadm info --query=all --name=/dev/mapper/$i |grep -i dm_uuid)"; done


vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_arch" OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_data1" OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_ocrvote1" OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_ocrvote2" OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_ocrvote3" OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_recover" OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",NAME="asm_redo" OWNER="grid",GROUP="asmadmin",MODE="0660"

 


#/sbin/udevadm control --reload-rules
#/sbin/start_udev
 ls -l /dev/asm*
 
 
 


 

你可能感兴趣的:(oracle)