mirror_zfs/cmd/zed
Don Brady f0f330e121
Fix ZED auto-replace for VDEVs using by-id paths
The change is simple -- restore the original code so that the VDEV 
path is updated when using by-id paths.  The more challenging part 
was to devise a second ZTS test, that would test auto-replace for 
'by-id' and help prevent a future regression.

With that new test, we can now do an A|B test with , and without, 
the fix to confirm that auto-replace for by-id paths works. The 
existing auto-replace test, functional/fault/auto_replace_001_pos, 
will confirm that we didn't break auto-replace for 'by-vdev' paths.

In the original functional/fault/auto_replace_001_pos test, the disk 
wipe (using dd) was not effective in removing the partitioning since 
the kernel was never informed of the wipe.

Added a call to wipefs(8) so that the kernel is informed and ZED will 
re-partition the device.
    
Added a validation step that the re-partitioning occurred by
confirming  that the GPT partition UUID changes.

Sponsored-By: OpenDrives Inc.
Sponsored-By: Klara Inc.
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Don Brady <don.brady@klarasystems.com>
Closes #15363
2023-10-20 09:29:02 -07:00
..
agents Fix ZED auto-replace for VDEVs using by-id paths 2023-10-20 09:29:02 -07:00
zed.d zed: Allow autoreplace and fault LEDs for removed vdevs 2023-09-18 16:25:58 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
zed_conf.c Fix usage of zed_log_msg() and zfs_panic_recover() 2022-09-19 17:32:18 -07:00
zed_conf.h Prevent zevent list from consuming all of kernel memory 2022-08-22 12:36:22 -07:00
zed_disk_event.c nvpair: Constify string functions 2023-03-14 15:25:50 -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 nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
zed_event.h Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed_exec.c Handle possible null pointers from malloc/strdup/strndup() 2022-10-06 17:18:40 -07:00
zed_exec.h Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed_file.c Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed_file.h Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed_log.c Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed_log.h Reduce false positives from Static Analyzers 2022-09-30 15:30:12 -07:00
zed_strings.c Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed_strings.h Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zed.c zed: main: fix unused, remove argsused 2021-12-21 12:05:11 -08:00
zed.h Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00