diff options
author | NeilBrown <neilb@suse.de> | 2010-06-30 16:55:17 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-06-30 16:55:17 +1000 |
commit | 7efa6bc34ff0357a491e64495a9b3a7483971000 (patch) | |
tree | 6a79912b446b504a17bbf550ad74592cbda0a1fc | |
parent | 29ba480497f8c45032180d4e358139e134454f4d (diff) | |
download | mdadm-7efa6bc34ff0357a491e64495a9b3a7483971000.tar.gz mdadm-7efa6bc34ff0357a491e64495a9b3a7483971000.tar.xz mdadm-7efa6bc34ff0357a491e64495a9b3a7483971000.zip |
Update udev rules for hotplug support.
- split the rules for handling components of array to be clearly
separate from rules for handling the arrays themselves.
- add call to "-If" when removing a device
- uncomment the --incremental call when adding a device.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | udev-md-raid.rules | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/udev-md-raid.rules b/udev-md-raid.rules index c9a4f0e..da52058 100644 --- a/udev-md-raid.rules +++ b/udev-md-raid.rules @@ -1,13 +1,13 @@ # do not edit this file, it will be overwritten on update SUBSYSTEM!="block", GOTO="md_end" -ACTION!="add|change", GOTO="md_end" -ACTION=="change", GOTO="md_no_incr" -# import data from a raid member and activate it -#ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}" -# import data from a raid set -LABEL="md_no_incr" +# handle potential components of arrays +ENV{ID_FS_TYPE}=="linux_raid_member", ACTION=="remove", RUN+="/sbin/mdadm -If $name" +ENV{ID_FS_TYPE}=="linux_raid_member", ACTION=="add", RUN+="/sbin/mdadm --incremental $env{DEVNAME}" + +# handle md arrays +ACTION!="add|change", GOTO="md_end" KERNEL!="md*", GOTO="md_end" # partitions have no md/{array_state,metadata_version}, but should not |