home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / root / etc / udev / rules.d / 71-multipath.rules < prev    next >
Text File  |  2006-11-29  |  869b  |  26 lines

  1. #
  2. # persistent links for device-mapper devices
  3. # only hardware-backed device-mapper devices (ie multipath, dmraid,
  4. # and kpartx) have meaningful persistent device names
  5. #
  6.  
  7. KERNEL!="dm-*", GOTO="multipath_end"
  8. ACTION=="add|remove", GOTO="multipath_end"
  9.  
  10. ACTION=="change", IMPORT{program}=="/sbin/kpartx_id %M %m"
  11.  
  12. # Create persistent links for tables
  13. ACTION=="change", ENV{ID_DM_TABLE}=="mpath|dmraid", ENV{ID_DM_TYPE}=="?*", \
  14.         SYMLINK+="disk/by-id/$env{ID_DM_TYPE}-$env{ID_DM_NAME}"
  15.  
  16. # Create dm tables for partitions
  17. ACTION=="change", ENV{ID_DM_TABLE}=="mpath|dmraid", \
  18.         RUN+="/sbin/kpartx -a -p _part /dev/mapper/$env{ID_DM_NAME}"
  19.  
  20. # Create persistent links for partitions
  21. ACTION=="change", ENV{ID_DM_TABLE}=="part", ENV{ID_DM_TYPE}=="?*", \
  22.         SYMLINK+="disk/by-id/$env{ID_DM_TYPE}-$env{ID_DM_NAME}-part$env{ID_DM_PART}"
  23.  
  24. LABEL="multipath_end"
  25.  
  26.