Advertising
- Untitled
- Wednesday, March 19th, 2008 at 5:42:54pm UTC
- #
- # persistent links for device-mapper devices
- # only hardware-backed device-mapper devices (ie multipath, dmraid,
- # and kpartx) have meaningful persistent device names
- #
- # Always attempt to load dm-multipath. This way we can get rid of the
- # init script.
- ACTION=="add|change", SUBSYSTEM=="block", \
- RUN+="/sbin/modprobe -Qba dm-multipath"
- KERNEL!="dm-*", GOTO="kpartx_end"
- ACTION=="remove", GOTO="kpartx_end"
- ENV{DM_TABLE_STATE}!="LIVE", GOTO="kpartx_end"
- ENV{DM_UUID}=="?*", IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"
- OPTIONS="link_priority=50"
- # Create persistent links for multipath tables
- ENV{DM_UUID}=="mpath-*", \
- SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
- # Create persistent links for dmraid tables
- ENV{DM_UUID}=="dmraid-*", \
- SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
- # Create persistent links for partitions
- ENV{DM_PART}=="?*", \
- SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"
- # Create dm tables for partitions
- ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \
- RUN+="echo %N > /tmp/yay"
- ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \
- RUN+="touch /tmp/hoh"
- ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \
- RUN+="/sbin/kpartx -a -p -part /dev/%N"
- ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \
- RUN+="/sbin/kpartx -a -p -part /dev/%N"
- LABEL="kpartx_end"
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.