zfs/cmd/zed
Tony Hutter 6568379eea Fix statechange-led.sh & unnecessary libdevmapper warning
- Fix autoreplace behaviour on statechange-led.sh script.

ZED sends the following events on an auto-replace:

1. statechange: Disk goes UNAVAIL->ONLINE
2. statechange: Disk goes ONLINE->UNAVAIL
3. vdev_attach: Disk goes ONLINE

Events 1-2 happen when ZED first attempts to do an auto-online.  When that
fails, ZED then tries an auto-replace, generating the vdev_attach event in #3.

In the previous code, statechange-led was only looking at the UNAVAIL->ONLINE
transition to turn off the LED.  It ignored the #2 ONLINE->UNAVAIL transition,
assuming it was just the "old" VDEV going offline.  This is problematic, as
a drive can go from ONLINE->UNAVAIL when it's malfunctioning, and we don't want
to ignore that.

This new patch correctly turns on the fault LED every time a drive becomes
UNAVAIL.  It also monitors vdev_attach events to trigger turning off the LED
when an auto-replaced disk comes online.

- Remove unnecessary libdevmapper warning with --with-config=kernel

This fixes an unnecessary libdevmapper warning when building
--with-config=kernel.  Kernel code does not use libdevmapper, so the warning
is not needed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #2375 
Closes #5312 
Closes #5331
2016-10-25 11:05:30 -07:00
..
agents Turn on/off enclosure slot fault LED even when disk isn't present 2016-10-24 10:45:59 -07:00
zed.d Fix statechange-led.sh & unnecessary libdevmapper warning 2016-10-25 11:05:30 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Multipath autoreplace, control enclosure LEDs, event rate limiting 2016-10-19 12:55:59 -07:00
zed.c Ensure zed _finish_daemonize() leaves fds 0-2 open 2016-03-08 17:46:41 -08:00
zed.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_conf.c Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_conf.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_disk_event.c Turn on/off enclosure slot fault LED even when disk isn't present 2016-10-24 10:45:59 -07:00
zed_disk_event.h Bring over illumos ZFS FMA logic -- phase 1 2016-09-01 11:39:45 -07:00
zed_event.c Turn on/off enclosure slot fault LED even when disk isn't present 2016-10-24 10:45:59 -07:00
zed_event.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_exec.c Fix file permissions 2016-10-08 14:57:56 -07:00
zed_exec.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_file.c Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_file.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_log.c Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_log.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_strings.c Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_strings.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00