mirror_zfs/tests/zfs-tests/tests/functional/fault
Brian Behlendorf 5266a0728a
ZED: Do not offline a missing device if no spare is available
Due to commit d48091d a removed device is now explicitly offlined by
the ZED if no spare is available, rather than the letting ZFS detect
it as UNAVAIL. This broke auto-replacing of whole-disk devices, as
described in issue #10577.  In short, when a new device is reinserted
in the same slot, the ZED will try to ONLINE it without letting ZFS
recreate the necessary partition table.

This change simply avoids setting the device OFFLINE when removed if
no spare is available (or if spare_on_remove is false).  This change
has been left minimal to allow it to be backported to 0.8.x release.
The auto_offline_001_pos ZTS test has been updated accordingly.

Some follow up work is planned to update the ZED so it transitions
the vdev to a REMOVED state.  This is a state which has always
existed but there is no current interface the ZED can use to
accomplish this.  Therefore it's being left to a follow up PR.

Reviewed-by: Gionatan Danti <g.danti@assyoma.it>
Co-authored-by: Gionatan Danti <g.danti@assyoma.it>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10577
Closes #10730
2020-08-18 22:13:17 -07:00
..
auto_offline_001_pos.ksh ZED: Do not offline a missing device if no spare is available 2020-08-18 22:13:17 -07:00
auto_online_001_pos.ksh Fix typos in tests/ 2019-09-02 18:10:31 -07:00
auto_replace_001_pos.ksh ZTS: Fix auto_replace_001_pos test 2018-10-29 15:05:14 -05:00
auto_spare_001_pos.ksh Various ZED fixes 2017-12-08 16:58:41 -08:00
auto_spare_002_pos.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
auto_spare_ashift.ksh Various ZED fixes 2017-12-08 16:58:41 -08:00
auto_spare_multiple.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
auto_spare_shared.ksh zpool: allow sharing of spare device among pools 2018-10-17 11:21:07 -07:00
cleanup.ksh Add scrub after resilver zed script 2018-02-23 11:38:05 -08:00
decompress_fault.ksh ZTS: Catalog tunable names for tests in tunables.cfg 2020-01-14 14:57:28 -08:00
decrypt_fault.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
fault.cfg ZTS: Fix a few defaults 2020-01-31 08:51:23 -08:00
Makefile.am zed: detect and offline physically removed devices 2018-11-09 11:17:24 -08:00
scrub_after_resilver.ksh ZTS: Fix zpool_status_-s 2019-10-11 10:22:20 -07:00
setup.ksh Add scrub after resilver zed script 2018-02-23 11:38:05 -08:00
zpool_status_-s.ksh ZTS: Catalog tunable names for tests in tunables.cfg 2020-01-14 14:57:28 -08:00