blkdevalias-0.10
[blkdevalias.git] / 99-blkdevalias.rules
1 KERNEL=="sd*[^0-9]" ENV{DEVTYPE}=="disk" \
2     PROGRAM="/sbin/scsi_id -g -u -d$tempnode" \
3     IMPORT="/sbin/blkdevalias map %c" \
4     MODE="$env{BA_MODE}" \
5     SYMLINK+="$env{BA_NAME}" OWNER="$env{BA_USER}" GROUP="$env{BA_GROUP}"
6
7 KERNEL=="sd*[1-9]*" ENV{DEVTYPE}=="partition" \
8     PROGRAM="/sbin/scsi_id -g -u -d/dev/$parent" \
9     IMPORT="/sbin/blkdevalias map %c" \
10     SYMLINK+="$env{BA_NAME}" OWNER="$env{BA_USER}" GROUP="$env{BA_GROUP}" \
11     MODE="$env{BA_MODE}" \
12     OPTIONS+={link_priority=5}
13
14 KERNEL=="dm*" ENV{DM_UUID}=="mpath*" \
15     PROGRAM="/sbin/scsi_id -g -u -d$tempnode" \
16     IMPORT="/sbin/blkdevalias map %c" \
17     SYMLINK+="$env{BA_NAME}" OWNER="$env{BA_USER}" GROUP="$env{BA_GROUP}" \
18     MODE="$env{BA_MODE}" \
19     OPTIONS+="link_priority=10"
20
21 KERNEL=="dm*" ENV{DM_UUID}=="part*" \
22     IMPORT="/sbin/mpath-parent $env{DM_NAME}"
23
24 KERNEL=="dm*" ENV{DM_UUID}=="part*" \
25     PROGRAM="/sbin/scsi_id -g -u -d/dev/mapper/$env{DM_PARENT}" \
26     IMPORT="/sbin/blkdevalias map %c" \
27     SYMLINK+="$env{BA_NAME}" OWNER="$env{BA_USER}" GROUP="$env{BA_GROUP}" \
28     MODE="$env{BA_MODE}" \
29     OPTIONS+="link_priority=15"