mirror_zfs/lib/libzfs
Tony Hutter 1bbd877049 Turn on/off enclosure slot fault LED even when disk isn't present
Previously when a drive faulted, the statechange-led.sh script would lookup
the drive's LED sysfs entry in /sys/block/sd*/device/enclosure_device, and
turn it on.  During testing we noticed that if you pulled out a drive, or if
the drive was so badly broken that it no longer appeared to Linux, that the
/sys/block/sd* path would be removed, and the script could not lookup the
LED entry.

To fix this, this patch looks up the disks's more persistent
"/sys/class/enclosure/X:X:X:X/Slot N" LED sysfs path at pool import.  It then
passes that path to the statechange-led script to use, rather than having the
script look it up on the fly.  This allows the script to turn on/off the slot
LEDs even when the drive is missing.

Closes #5309 
Closes #2375
2016-10-24 10:45:59 -07:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c Fix coverity defects: CID 147654, 147690 2016-10-13 14:02:07 -07:00
libzfs_config.c Fix indefinite article 2016-08-11 11:23:49 -07:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_dataset.c Fix coverity defects: CID 147551, 147552 2016-10-20 11:49:50 -07:00
libzfs_diff.c Fix coverity defects: CID 147443, 147656, 147655, 147441, 147653 2016-09-29 13:33:09 -07:00
libzfs_fru.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
libzfs_import.c Turn on/off enclosure slot fault LED even when disk isn't present 2016-10-24 10:45:59 -07:00
libzfs_iter.c Performance optimization of AVL tree comparator functions 2016-08-31 14:35:34 -07:00
libzfs_mount.c Change /etc/mtab to /proc/self/mounts 2016-09-20 10:07:58 -07:00
libzfs_pool.c Turn on/off enclosure slot fault LED even when disk isn't present 2016-10-24 10:45:59 -07:00
libzfs_sendrecv.c Fix coverity defects: CID 147654, 147690 2016-10-13 14:02:07 -07:00
libzfs_status.c Read spl_hostid module parameter before gethostid() 2015-02-04 16:44:53 -08:00
libzfs_util.c Fix coverity defects: CID 147488, 147490 2016-10-14 11:00:47 -07:00
libzfs.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
Makefile.am Multipath autoreplace, control enclosure LEDs, event rate limiting 2016-10-19 12:55:59 -07:00