Doug Ledford: udev rules: add watch option

Martin F. Krafft madduck at alioth.debian.org
Sun Aug 29 11:55:44 UTC 2010


Module: mdadm
Branch: upstream
Commit: 2913d9df16123e2453eacd24c3b3e1029887c21c
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=2913d9df16123e2453eacd24c3b3e1029887c21c

Author: Doug Ledford <dledford at redhat.com>
Date:   Tue Jul 20 12:18:12 2010 -0400

udev rules: add watch option

The watch option to udev tells udev to watch our mdadm device file for
close events and on a close it rechecks the device.  This means that if,
for example, we use mdadm to --grow the array from a 4 disk to 5 disk
array, when mdadm closes the array, udev will re-read the superblock and
update its internal database with the new information.  This can also be
used to cause udev to create new device special files if, for example, a
partitioning program is used to modify the partition table on the actual
md device and that program does not call the syscall to reread the
partition table.

Signed-off-by: Doug Ledford <dledford at redhat.com>

---

 udev-md-raid.rules |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/udev-md-raid.rules b/udev-md-raid.rules
index da52058..f9607f3 100644
--- a/udev-md-raid.rules
+++ b/udev-md-raid.rules
@@ -32,6 +32,7 @@ ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNA
 
 IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
 OPTIONS+="link_priority=100"
+OPTIONS+="watch"
 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
 




More information about the pkg-mdadm-commits mailing list