Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZED: Match added disk by pool/vdev GUID if found #12217

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jun 10, 2021

Motivation and Context

ZED currently can only auto-online/replace disks that are wholedisk managed by ZFS. It matches either devid or phys_path, neither of which are retained in the pool config unless the vdev was a wholedisk.

Description

Add another fallback matching by pool/vdev GUID.
Log the is_part field in the event to ease future debugging.

How Has This Been Tested?

I added a test to ZTS for partitioned vdev auto-online using scsi_debug. I've also manually tested this with physical hardware by pulling a drive from a mirror and reinserting it. The pool was degraded and then the device was brought back online by zed as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@ghost ghost added Component: ZED ZFS Event Daemon Status: Code Review Needed Ready for review and testing labels Jun 10, 2021
@ghost ghost force-pushed the NAS-108560 branch 2 times, most recently from 97d2a20 to 1b88c91 Compare June 10, 2021 23:41
@ghost
Copy link
Author

ghost commented Jun 11, 2021

Looks like I need to add an exception to zts-report.py to allow the github test runners to SKIP the test.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jun 15, 2021
@behlendorf
Copy link
Contributor

Looks through the test results again it looks like the new test is reliably failing on CentOS 7. It's probably an issue with the test case and this old environment, but we'll need to sort it out before merging this.

This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
@ghost
Copy link
Author

ghost commented Jun 23, 2021

Rebased and added block_device_wait before creating the pool to make sure the partition has appeared in /dev.

@tonyhutter tonyhutter merged commit cfc564f into openzfs:master Jun 30, 2021
@ghost ghost deleted the NAS-108560 branch June 30, 2021 18:43
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Aug 23, 2021
This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Aug 24, 2021
This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Aug 24, 2021
This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Aug 24, 2021
This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
behlendorf pushed a commit that referenced this pull request Aug 31, 2021
This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 15, 2021
This enables ZED to auto-online vdevs that are not wholedisk managed by
ZFS.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ZED ZFS Event Daemon Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants