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-127511 / 25.04 / Fix zpool status for reporting used spare disks correctly #14262

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

Qubad786
Copy link
Contributor

@Qubad786 Qubad786 commented Aug 19, 2024

Problem

zpool.status was not properly reporting path for disk properly when a spare had replaced a data disk.

Solution

We are now using zpool status for retrieving serialized information about the zpool so we can properly account for disk path being reported for spare based disks and that is much better optimized for a system with large number of disks as compared to py-libzfs.

@Qubad786 Qubad786 requested a review from a team August 19, 2024 10:42
@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Fix zpool status for reporting used spare disks correctly NAS-127511 / 25.04 / Fix zpool status for reporting used spare disks correctly Aug 19, 2024
@themylogin
Copy link
Contributor

Can we have integration tests for this?

@Qubad786 Qubad786 requested review from a team and removed request for a team September 1, 2024 23:51
Copy link
Contributor

@yocalebo yocalebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zpool status will resolve the vdev devices so we need to remove the resolve_* methods accordingly.

If real_paths is true, we can use -PL otherwise, we can just use -P.

-P will give full path to device (i.e. /dev/disk/by-partuuid/**)
-PL will give full path to real device (i.e. /dev/sda1)

Copy link
Contributor

@yocalebo yocalebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, actually, we'll leave it as is for now since this is going into RC.1

@Qubad786 Qubad786 merged commit fd3a775 into master Sep 4, 2024
3 checks passed
@Qubad786 Qubad786 deleted the NAS-127511 branch September 4, 2024 19:15
@bugclerk
Copy link
Contributor

bugclerk commented Sep 4, 2024

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants