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: mark disks as REMOVED when they are removed #96

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

ixhamza
Copy link

@ixhamza ixhamza commented Sep 30, 2022

Motivation and Context

zed: mark disks as REMOVED when they are removed

Description

ZED does not take any action for disk removal events if there is no spare VDEV
available.Added zpool_vdev_remove_wanted() in libzfs and vdev_remove_wanted()
in vdev.c to remove the VDEV through ZED on removal event. This means that if
you are running zed and remove a disk, it will be properly marked as REMOVED.
Upstream PR: openzfs#13797 (Merged)

How Has This Been Tested?

By hotplugging vdevs through QEMU

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:

ZED does not take any action for disk removal events if there is no
spare VDEV available. Added zpool_vdev_remove_wanted() in libzfs
and vdev_remove_wanted() in vdev.c to remove the VDEV through ZED
on removal event.  This means that if you are running zed and
remove a disk, it will be propertly marked as REMOVED.

Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>

# Conflicts:
#	include/libzfs.h
#	include/os/linux/Makefile.am
#	lib/libzfs/libzfs.abi
@ixhamza ixhamza requested review from amotin, a user and usaleem-ix September 30, 2022 17:23
@ixhamza ixhamza merged commit e09b5a1 into truenas/zfs-2.1-release Sep 30, 2022
@ixhamza ixhamza deleted the NAS-115238-testing branch September 30, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants