]> git.proxmox.com Git - mirror_zfs.git/commit
Fix ZED auto-replace for VDEVs using by-id paths
authorDon Brady <don.brady@delphix.com>
Fri, 20 Oct 2023 16:29:02 +0000 (10:29 -0600)
committerGitHub <noreply@github.com>
Fri, 20 Oct 2023 16:29:02 +0000 (09:29 -0700)
commitf0f330e1212ee3924a3eadbdb40e7d71e0fb0a69
tree4db3f4a2281ffd8b77ddd983f50b4e8855657795
parentc0e58995e33479a9c1d97fb2a19f8f507cc954b7
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
cmd/zed/agents/zfs_mod.c
include/libzutil.h
lib/libzutil/os/linux/zutil_import_os.c
tests/runfiles/linux.run
tests/test-runner/bin/zts-report.py.in
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/fault/auto_replace_001_pos.ksh
tests/zfs-tests/tests/functional/fault/auto_replace_002_pos.ksh [new file with mode: 0755]