From: Harald Hoyer Date: Mon, 13 Jul 2009 15:16:55 +0000 (+0200) Subject: prevent LVM scan loops X-Git-Tag: 0.5~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21e033f8efb4415a04daebd3c280183ad1e242fa;p=platform%2Fupstream%2Fdracut.git prevent LVM scan loops lvm vgscan causes "change" events for all devices, to prevent a loop, remember the devices, which trigger the scan of the devices. --- diff --git a/modules.d/90dmraid/61-dmraid.rules b/modules.d/90dmraid/61-dmraid.rules index 9fac499..e8e9d65 100644 --- a/modules.d/90dmraid/61-dmraid.rules +++ b/modules.d/90dmraid/61-dmraid.rules @@ -7,6 +7,8 @@ ACTION!="add|change", GOTO="dm_end" ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end" -ENV{ID_FS_TYPE}=="*_raid_member", RUN+="/bin/ln -fs /sbin/dmraid_scan /initqueue/dmraid_scan.sh" +ENV{ID_FS_TYPE}=="*_raid_member", \ + TEST!="/tmp/.dmraid_scan-%k", \ + RUN+="/bin/sh -c '>/tmp/.dmraid_scan-%k; /bin/ln -fs /sbin/dmraid_scan /initqueue/dmraid_scan.sh'" LABEL="dm_end" diff --git a/modules.d/90lvm/64-lvm-vol_id.rules b/modules.d/90lvm/64-lvm-vol_id.rules index 2b0f44d..d3a07c1 100644 --- a/modules.d/90lvm/64-lvm-vol_id.rules +++ b/modules.d/90lvm/64-lvm-vol_id.rules @@ -9,7 +9,9 @@ ACTION!="add|change", GOTO="lvm_end" KERNEL=="dm-*", IMPORT{program}="vol_id --export $tempnode" -ENV{ID_FS_TYPE}=="LVM2_member", RUN+="/bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh" +ENV{ID_FS_TYPE}=="LVM2_member", \ + TEST!="/tmp/.lvm_scan-%k", \ + RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k; /bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh'" OPTIONS="link_priority=-100" ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules index 1b1b6f4..3403020 100644 --- a/modules.d/90lvm/64-lvm.rules +++ b/modules.d/90lvm/64-lvm.rules @@ -9,7 +9,9 @@ ACTION!="add|change", GOTO="lvm_end" KERNEL=="dm-*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" -ENV{ID_FS_TYPE}=="LVM2_member", RUN+="/bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh" +ENV{ID_FS_TYPE}=="LVM2_member", \ + TEST!="/tmp/.lvm_scan-%k", \ + RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k; /bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh'" OPTIONS="link_priority=-100" ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"