zfs-builds-mm/zfs-0.8.1/udev/rules.d/69-vdev.rules
2019-07-06 23:40:11 +02:00

14 lines
687 B
Text

#
# /lib/udev/rules.d/69-vdev.rules
#
ENV{DEVTYPE}=="disk", IMPORT{program}="/lib/udev/vdev_id -d %k"
ENV{DEVTYPE}=="partition", IMPORT{program}="/lib/udev/vdev_id -d %k"
KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}-part%n"
KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
# Enclosure device symlink rules
ENV{SUBSYSTEM}=="scsi_generic", IMPORT{program}="/lib/udev/vdev_id -e"
ENV{SUBSYSTEM}=="scsi_generic", ENV{ID_ENCLOSURE}=="?*", SYMLINK+="$env{ID_ENCLOSURE_PATH}"