linux 系统中使用udev固定oracle asm磁盘名称、权限方式

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


--rhel/ol 5
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_", NAME="asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"

--rhel/ol 6
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_", NAME="asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
or
KERNEL==”dm-*”,ENV{DM_UUID}==”mpath-14f504e46494c4552686a374a58592d763045432d5a305a6a”,NAME=”asm-data1″ OWNER=”grid”,GROUP=”asmadmin”,MODE=”0660″

--rhel/ol 7
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_", SYMLINK+="asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
or
ACTION=="add|change", ENV{DM_UUID}=="mpath-360002ac0000000000000004000019a05", SYMLINK+="asm-data1", GROUP="asmadmin", OWNER="grid", MODE="0660"

 

--rhel/ol 5/6 重新加载
start_udev

--rhel/ol 7 重新加载
/sbin/udevadm control --reload
or
/sbin/udevadm trigger --type=devices --action=change

上一篇:195-C/C++中的__asm关键字


下一篇:【DB笔试面试705】在Oracle中,ASM磁盘有几种冗余方式?