1*7c604eeaShaad# Copyright (C) 2009 Red Hat, Inc. All rights reserved. 2*7c604eeaShaad# 3*7c604eeaShaad# This file is part of LVM2. 4*7c604eeaShaad 5*7c604eeaShaad# Udev rules for device-mapper devices. 6*7c604eeaShaad# 7*7c604eeaShaad# These rules create symlinks in /dev/disk directory. 8*7c604eeaShaad# Symlinks that depend on probing filesystem type, 9*7c604eeaShaad# label and uuid are created only if the device is not 10*7c604eeaShaad# suspended. 11*7c604eeaShaad 12*7c604eeaShaad# "add" event is processed on coldplug only! 13*7c604eeaShaadACTION!="add|change", GOTO="dm_end" 14*7c604eeaShaadENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end" 15*7c604eeaShaadENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end" 16*7c604eeaShaad 17*7c604eeaShaadSYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" 18*7c604eeaShaadENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" 19*7c604eeaShaad 20*7c604eeaShaadENV{DM_SUSPENDED}=="1", GOTO="dm_end" 21*7c604eeaShaad 22*7c604eeaShaadIMPORT{program}="$env{DM_SBIN_PATH}/blkid -o udev -p $tempnode" 23*7c604eeaShaadENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100" 24*7c604eeaShaadENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" 25*7c604eeaShaadENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" 26*7c604eeaShaad 27*7c604eeaShaadLABEL="dm_end" 28