udev磁盘绑定

时间:2024-01-05 12:14:14

udev磁盘绑定

[grid@db-rac02 ~]$ cat 99-asm-multipath.rules
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d96f10000000b",NAME="sda", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d97240000000c",NAME="sdb", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d973e0000000d",NAME="sdc", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d97670000000e",NAME="sdd", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d97820000000f",NAME="sde", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d97b100000010",NAME="sdf", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d97d400000011",NAME="sdg", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d981300000012",NAME="sdh", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d983800000013",NAME="sdi", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d986200000014",NAME="sdj", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d988b00000015",NAME="sdk", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7d98cb00000016",NAME="sdl", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7e63b400000017",NAME="sdm", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7e63e400000018",NAME="sdn", OWNER="grid", GROUP="asmadmin", MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="36c0bfc01002033fd0e7e644c00000019",NAME="sdo", OWNER="grid", GROUP="asmadmin", MODE="777"

KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7a5500000002",NAME="ora-data01",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7b4400000003",NAME="ora-data02",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7ba200000004",NAME="ora-data03",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7bd900000005",NAME="ora-data04",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7c5a00000006",NAME="ora-data05",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7cc100000007",NAME="ora-data06",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7d3400000008",NAME="ora-data07",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7f4500000009",NAME="ora-data08",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7fc40000000a",NAME="ora-data09",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b7ff40000000b",NAME="ora-data10",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b80710000000c",NAME="ora-data11",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000b80bb0000000d",NAME="ora-data12",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000c02b20000000e",NAME="ora-ocr01",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000c03cf0000000f",NAME="ora-ocr02",OWNER="grid",GROUP="asmadmin",MODE="777"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="363ce824100885c06000c044c00000010",NAME="ora-ocr03",OWNER="grid",GROUP="asmadmin",MODE="777",RUN+="/sbin/partprobe"
[grid@db-rac02 ~]$
[root@db-rac02 rules.d]# cat 99-oracle-asmdevices.rules
2018-10-31 drop of Huawei 5500 from RAC
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d96f10000000b",NAME:="asmdata01", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d97240000000c",NAME:="asmdata02", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d973e0000000d",NAME:="asmdata03", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d97670000000e",NAME:="asmdata04", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d97820000000f",NAME:="asmdata05", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d97b100000010",NAME:="asmdata06", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d97d400000011",NAME:="asmdata07", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d981300000012",NAME:="asmdata08", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d983800000013",NAME:="asmdata09", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d986200000014",NAME:="asmdata10", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d988b00000015",NAME:="asmdata11", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7d98cb00000016",NAME:="asmdata12", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7e63b400000017",NAME:="asmdata13", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7e63e400000018",NAME:="asmdata14", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="36c0bfc01002033fd0e7e644c00000019",NAME:="asmdata15", ACTION=="add|change",OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7a5500000002",NAME="ora-data01",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7b4400000003",NAME="ora-data02",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7ba200000004",NAME="ora-data03",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7bd900000005",NAME="ora-data04",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7c5a00000006",NAME="ora-data05",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7cc100000007",NAME="ora-data06",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7d3400000008",NAME="ora-data07",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7f4500000009",NAME="ora-data08",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7fc40000000a",NAME="ora-data09",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b7ff40000000b",NAME="ora-data10",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b80710000000c",NAME="ora-data11",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000b80bb0000000d",NAME="ora-data12",ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000c02b20000000e",NAME="ora-ocr01", ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000c03cf0000000f",NAME="ora-ocr02", ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$name",RESULT=="363ce824100885c06000c044c00000010",NAME="ora-ocr03", ACTION=="add|change",OWNER="grid",GROUP="asmadmin",MODE="0660"
[root@db-rac02 rules.d]#
[root@db-rac02 rules.d]# cat 70-persistent-cd.rules
# This file was automatically generated by the /lib/udev/write_cd_rules
# program, run by the cd-aliases-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and set the $GENERATED variable.

# PLDS_DVD-ROM_DS-8DBSH (pci-0000:00:1f.2-scsi-2:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-2:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-2:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1"
[root@db-rac02 rules.d]# cat 55-usm.rules
#
# ADVM devices
KERNEL=="asm/*",      GROUP="asmadmin", MODE="0770"
KERNEL=="asm/.*",     GROUP="asmadmin", MODE="0770"
#
# ACFS devices
KERNEL=="ofsctl",     GROUP="asmadmin", MODE="0664"