186d7f5d3SJohn Marino# Copyright (C) 2009 Red Hat, Inc. All rights reserved. 286d7f5d3SJohn Marino# 386d7f5d3SJohn Marino# This file is part of LVM2. 486d7f5d3SJohn Marino 586d7f5d3SJohn Marino# Udev rules for device-mapper devices. 686d7f5d3SJohn Marino# 786d7f5d3SJohn Marino# These rules create symlinks in /dev/disk directory. 886d7f5d3SJohn Marino# Symlinks that depend on probing filesystem type, 986d7f5d3SJohn Marino# label and uuid are created only if the device is not 1086d7f5d3SJohn Marino# suspended. 1186d7f5d3SJohn Marino 1286d7f5d3SJohn Marino# "add" event is processed on coldplug only! 1386d7f5d3SJohn MarinoACTION!="add|change", GOTO="dm_end" 1486d7f5d3SJohn MarinoENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end" 1586d7f5d3SJohn MarinoENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end" 1686d7f5d3SJohn Marino 1786d7f5d3SJohn MarinoSYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" 1886d7f5d3SJohn MarinoENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" 1986d7f5d3SJohn Marino 2086d7f5d3SJohn MarinoENV{DM_SUSPENDED}=="1", GOTO="dm_end" 2186d7f5d3SJohn Marino 2286d7f5d3SJohn MarinoIMPORT{program}="$env{DM_SBIN_PATH}/blkid -o udev -p $tempnode" 2386d7f5d3SJohn MarinoENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100" 2486d7f5d3SJohn MarinoENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" 2586d7f5d3SJohn MarinoENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" 2686d7f5d3SJohn Marino 2786d7f5d3SJohn MarinoLABEL="dm_end" 28