1 # device mapper links hook into "change" events, when the dm table
2 # becomes available; some table-types must be ignored
4 KERNEL=="device-mapper", NAME="mapper/control"
6 KERNEL=="dm-*", ACTION=="add|change", GOTO="device_mapper_do"
7 GOTO="device_mapper_end"
8 LABEL="device_mapper_do"
11 # use dmsetup, until devmap_name is provided by sys-fs/device-mapper
12 PROGRAM=="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info",
15 # do not do anything if dmsetup does not provide a name
16 ENV{ID_DM_NAME}=="", NAME="", OPTIONS="ignore_device"
18 # ignore luks crypt devices while not fully up
19 ENV{ID_DM_NAME}=="temporary-cryptsetup-*", NAME="", OPTIONS="ignore_device"
22 ENV{ID_DM_NAME}=="?*", NAME="mapper/$env{ID_DM_NAME}"
24 PROGRAM!="/sbin/dmsetup status -j %M -m %m", GOTO="device_mapper_end"
25 RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
27 IMPORT{program}="vol_id --export $tempnode"
28 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}", OPTIONS="link_priority=50"
29 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}", OPTIONS="link_priority=50"
31 LABEL="device_mapper_end"