Commit Graph

10 Commits

Author SHA1 Message Date
Przemyslaw Czarnowski 475a01b8bc Update of udev rules to support IMSM devices
ID_FS_TYPE for IMSM members is set to isw_raid_member, so they must also
be handled in udev.

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-11-22 20:58:06 +11:00
Przemyslaw Czarnowski 950bc34477 added --path <path_id> to give the information on the 'path-id' of removed device
<path-id> allows to identify the port to which given device is plugged
in.  In case of hot-removal, udev can pass this information for future
use (eg. write this name as 'cookie' allowing to detect the fact of
reinserting device to the same port).

--path <path-id> parameter has been added to device removal handle
(and char *path has been added to IncrementalRemove() to pass this
value) in order to pass path-id to this handler.

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-11-22 20:58:06 +11:00
Doug Ledford 2913d9df16 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@redhat.com>
2010-07-22 10:16:31 -04:00
NeilBrown 7efa6bc34f 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>
2010-06-30 16:55:17 +10:00
Marco d'Itri 5bac0443e0 vol_id was removed by the udev upstream maintainer in May 2009.
One should use
  /sbin/blkid -o udev -p ...
(from util-linux >> 2.16) instead of
  vol_id --export ...

Author: Marco d'Itri <md@linux.it>
Bug-Debian: http://bugs.debian.org/541884
Reviewed-by: martin f. krafft <madduck@debian.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2009-10-29 10:14:43 +11:00
NeilBrown 67732c393b udev-md-raid.rules: use string_escape
For safety, "MD_NAME" strings should be escaped in udev.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-05-11 15:47:10 +10:00
NeilBrown fa5090285a udev rules fix for partitions.
sysfs directories for partitions do not have md/* files, but
should not for that reason be ignored.

Thanks to Michal Soltys for original fix.

Signed-off-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: NeilBrown <neilb@suse.de>
2009-04-14 10:58:54 +10:00
Doug Ledford a9934ce441 mdadm udev rules change
I'm not attaching a patch for this because it's so simple.  Long story
short, watching both add and change events in udev rules is bad for md
devices.  Specifically, the kernel will generate a change event on
things like array stop, and on things like fdisk close.  In the case
of array stop, it can result in the array being assembled again
immediately.  In the case of fdisk close, the situation is worse.
Let's say you stop all the md devices on some block device in order to
repartition.  You run fdisk, change the partition table, then issue a
write of the table.  The write of the table triggers the change event
*before* the kernel updates the partition table in memory for the
block device, causing udev to rerun the incremental rules on the old
partition table and restart all the arrays you just stopped with the
old partition table layout, at which point the kernel is unable to
reread the partition table.  So, once you've enable incremental
assembly, it becomes apparent that what we really want is to only
start devices on add, not on add|change.

--

Doug Ledford <dledford@redhat.com>
2009-04-08 17:32:55 +10:00
NeilBrown fabf4941b1 Fix udev-rules for case where array isn't really there..
See http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=b822542608326092e177fd1707ca7fb53b2846c4

Signed-off-by: NeilBrown <neilb@suse.de>
2009-03-09 10:14:48 +11:00
NeilBrown 757a5d74ff Add udev rules file for mdadm.
This is based on the rules from openSUSE 11.1-rc3.
2008-11-04 20:50:39 +11:00