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

NAS-115112 / None / zfsd: add support for hotplugging spares #258

Draft
wants to merge 2 commits into
base: truenas/13-stable
Choose a base branch
from

Conversation

ixhamza
Copy link
Contributor

@ixhamza ixhamza commented Apr 12, 2023

If you remove an unused spare and then reinsert it, zfsd will now online it in all pools.

Submitted by: Ameer Hamza ahamza@ixsystems.com (zfsd), Me (tests)
MFC after: 2 weeks
MFC with: 2a58b31
Sponsored by: iX Systems, Axcient
Pull Request: freebsd/freebsd-src#697

@bugclerk bugclerk changed the title zfsd: add support for hotplugging spares NAS-115112 / None / zfsd: add support for hotplugging spares Apr 12, 2023
@bugclerk
Copy link

ixhamza and others added 2 commits April 12, 2023 05:26
zfsd fetches new pool configuration through ZFS_IOC_POOL_STATS but
it does not get updated nvlist configuration for spare vdev since
the configuration is read by spa_spares->sav_config. In this commit,
updating the vdev state for spare vdev that is consumed by zfsd on
spare disk hotplug.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #14653
If you remove an unused spare and then reinsert it, zfsd will now online
it in all pools.

Do not MFC without 2a58b31 (but it's ok to MFC that one without this
one).

Submitted by:	Ameer Hamza <ahamza@ixsystems.com> (zfsd), Me (tests)
MFC after:	2 weeks
MFC with:	2a58b31
Sponsored by:	iX Systems, Axcient
Pull Request:	freebsd/freebsd-src#697
@amotin
Copy link
Collaborator

amotin commented Apr 12, 2023

On Core we are building alternative version of ZFS via ports instead of the bundled OS one. So while this PR looks OK to me, it should be merged only after we update OpenZFS ports to 2.1.10 after one released, otherwise we'll loose the kernel part.

@ixhamza ixhamza marked this pull request as draft April 12, 2023 20:32
@ixhamza
Copy link
Contributor Author

ixhamza commented Apr 12, 2023

Drafting it for now to check more about the zfsd port.

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.

5 participants