chiark / gitweb /
15e7ddf75555bf37409f03cbc1de05be0f8f3f71
[elogind.git] / rules / suse / 64-device-mapper.rules
1 # do not edit this file, it will be overwritten on update
2
3 KERNEL=="device-mapper", SYMLINK+="mapper/control"
4
5 KERNEL!="dm-*", GOTO="device_mapper_end"
6 ACTION!="add|change", GOTO="device_mapper_end"
7
8 IMPORT{program}="/sbin/dmsetup export -j%M -m%m"
9 ENV{DM_NAME}!="?*", GOTO="device_mapper_end"
10
11 SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace"
12 ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
13
14 ENV{DM_STATE}=="SUSPENDED", GOTO="device_mapper_end"
15 ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end"
16
17 IMPORT{program}="vol_id --export $tempnode"
18 OPTIONS+="link_priority=-100"
19 OPTIONS+="watch"
20 ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
21 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
22 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
23
24 LABEL="device_mapper_end"