# SAS phy <-> HDD label mapper # /lib/udev/rules.d/61-baylinks.rules SUBSYSTEM!="block", GOTO="baylabel_end" KERNEL!="sd?*", GOTO="baylabel_end" # NOTE: ACTION=="add" is not sufficient, because a simple "parted -lm" would # trigger a change event, which would remove the symlink, if it is not added # again by the script! ENV{DEVTYPE}=="disk", PROGRAM="bayLinks.sh $devpath", RESULT=="?*", SYMLINK+="%c{1}" # duto limitations of grub/initramfs wrt. zfs as well as zfs its own # pecularities, we have to flatten the structure ACTION!="remove", ENV{DEVTYPE}=="partition", PROGRAM="bayLinks.sh $devpath", RESULT=="?*", SYMLINK+="%c{1}p%n %c{2}p%n" LABEL="baylabel_end"