File: //proc/25618/root/lib64/udev/rules.d/45-update-disk-info.rules
#author: System Integration Team
#only handle SATA/SAS/EUNIT port type
ENV{SYNO_DEV_DISKPORTTYPE}!="SATA|SAS|EUNIT|CACHE|ESATA|SYS", GOTO="disk_end"
#ignore partition
ENV{DEVTYPE}=="partition", GOTO="disk_end"
#ignore multipath device add which not the add of first target device
ENV{SYNO_SUPPORT_MULTIPATH}=="yes", KERNEL=="sas*", ENV{PHYSDEVDRIVER}!="sd", ACTION=="add", ENV{MPATH_TARGET_ADD_TYPE}!="init", GOTO="disk_end"
KERNEL=="sas*", ACTION=="add", RUN+="/usr/syno/bin/synoenc --sas_disk_snapshot_remove %k"
ACTION=="add", SUBSYSTEM=="block", ENV{DEVNAME}!="", RUN+="/usr/syno/sbin/synostorage --add-disk %E{DEVNAME}"
ACTION=="remove", SUBSYSTEM=="block", ENV{DEVNAME}!="", RUN+="/usr/syno/sbin/synostorage --remove-disk %E{DEVNAME}"
LABEL="disk_end"