--1.块设备方式配置共享存储
存储信息:
20个1TB的LUN,/dev/mapper/mpath1--mpath20
修改/etc/udev/rules.d/12-dm-permissions.rules添加内容
vi /etc/udev/rules.d/12-dm-permissions.rules
ENV{DM_NAME}=="mpath1", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath2", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath3", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath4", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath5", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath6", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath7", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath8", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath9", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath10", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath11", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath12", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath13", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath14", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath15", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath16", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath17", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath18", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath19", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="mpath20", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
刷新磁盘组(linux7)
systemctl restart systemd-udev-trigger.service
刷新磁盘组(linux6)
start_udev
--2.裸设备方式配置共享存储
直接编译以下修改后的内容到:vi /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sddlmaa", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sddlmab", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sddlmac", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sddlmad", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sddlmae", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sddlmaf", RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="sddlmag", RUN+="/bin/raw /dev/raw/raw7 %N"
ACTION=="add", KERNEL=="sddlmah", RUN+="/bin/raw /dev/raw/raw8 %N"
ACTION=="add", KERNEL=="sddlmai", RUN+="/bin/raw /dev/raw/raw9 %N"
ACTION=="add", KERNEL=="sddlmaj", RUN+="/bin/raw /dev/raw/raw10 %N"
ACTION=="add", KERNEL=="sddlmak", RUN+="/bin/raw /dev/raw/raw11 %N"
ACTION=="add", KERNEL=="sddlmal", RUN+="/bin/raw /dev/raw/raw12 %N"
ACTION=="add", KERNEL=="sddlmam", RUN+="/bin/raw /dev/raw/raw13 %N"
ACTION=="add", KERNEL=="sddlman", RUN+="/bin/raw /dev/raw/raw14 %N"
ACTION=="add", KERNEL=="sddlmao", RUN+="/bin/raw /dev/raw/raw15 %N"
ACTION=="add", KERNEL=="sddlmap", RUN+="/bin/raw /dev/raw/raw16 %N"
ACTION=="add", KERNEL=="sddlmba", RUN+="/bin/raw /dev/raw/raw17 %N"
ACTION=="add", KERNEL=="sddlmbb", RUN+="/bin/raw /dev/raw/raw18 %N"
ACTION=="add", KERNEL=="sddlmbc", RUN+="/bin/raw /dev/raw/raw19 %N"
KERNEL=="raw*",ACTION=="add",OWNER="grid",GROUP="asmadmin",MODE="0660"
查看分区情况(1.2)
fdisk -l | grep sddl
不读盘的话: cd /opt/DynamicLinkManager/bin 执行 ./dlmstart
--重启udev服务(1.2)
(linux7)
systemctl restart systemd-udev-trigger.service
(linux6)
start_udev
--3.99
直接编译以下修改后的内容到:vi /etc/udev/rules.d/99-oracle-asmdisks.rules
ACTION=="add|change",KERNEL=="sddlm*",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="360060e80072be60000302be600000420",SYMLINK+="rhdiskdj",OWNER="grid",GROUP="asmadmin",MODE="0660"
ACTION=="add|change",KERNEL=="sddlm*",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="360060e80072be60000302be600000421",SYMLINK+="rhdiskdk",OWNER="grid",GROUP="asmadmin",MODE="0660"
ACTION=="add|change",KERNEL=="sddlm*",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="360060e80072be60000302be600000422",SYMLINK+="rhdiskdl",OWNER="grid",GROUP="asmadmin",MODE="0660"
ACTION=="add|change",KERNEL=="sddlm*",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="360060e80072be60000302be600000423",SYMLINK+="rhdiskdm",OWNER="grid",GROUP="asmadmin",MODE="0660"