常见多为multipath.conf的配置方式
这是单通道配置方式
扫描通道
python
[root@rac12-2 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@rac12-2 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
python
# for disk in /dev/sd*; do echo "WWID of $disk is: $(/lib/udev/scsi_id -g -u -d $disk)"; done
WWID of /dev/sda is: 3600224806c54328a8971625988b0c043
WWID of /dev/sda1 is: 3600224806c54328a8971625988b0c043
WWID of /dev/sda2 is: 3600224806c54328a8971625988b0c043
WWID of /dev/sda3 is: 3600224806c54328a8971625988b0c043
WWID of /dev/sdb is: 36000d31005a42e000000000000000024
WWID of /dev/sdc is: 36000d31005a42e000000000000000025
WWID of /dev/sdd is: 36000d31005a42e000000000000000023
WWID of /dev/sde is: 36000d31005a42e000000000000000022
WWID of /dev/sde1 is: 36000d31005a42e000000000000000022
WWID of /dev/sde2 is: 36000d31005a42e000000000000000022
# lsblk -S -a --output NAME,WWN,UUID,PKNAME,MODEL,SERIAL
NAME WWN UUID PKNAME MODEL SERIAL
sda 0x600224806c54328a Virtual Disk 600224806c54328a8971625988b0c043
sdb 0x6000d31005a42e00 Compellent Vol 6000d31005a42e000000000000000024
sdc 0x6000d31005a42e00 Compellent Vol 6000d31005a42e000000000000000025
sdd 0x6000d31005a42e00 Compellent Vol 6000d31005a42e000000000000000023
sde 0x6000d31005a42e00 Compellent Vol 6000d31005a42e000000000000000022
python
# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="36000d31005a42e000000000000000023",SYMLINK+="asm-100g-0023-ocr1",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="36000d31005a42e000000000000000024",SYMLINK+="asm-100g-0024-ocr2",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*",SUBSYSTEM=="block",PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="36000d31005a42e000000000000000025",SYMLINK+="asm-2000g-0025-data001",OWNER="grid",GROUP="asmadmin",MODE="0660"
重新加载
python
[root@rac12-2 ~]# /sbin/udevadm control --reload-rules
[root@rac12-2 ~]# /sbin/udevadm trigger