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-129750 / 24.04.2 / fix scrambing start sector of data partitions in pool.expand (by yocalebo) #13952

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

bugclerk
Copy link
Contributor

A fix was done here recently to ensure we maintain the start sector offset of the data partition for pool.expand. However, it uncovered the fact that we're not calculating the start sector properly because the kernel has 0 documentation on these sysfs files (which is where we enumerate this information) and so we made an incorrect assumption of how it works. This manifests itself on 4kn drives. Almost all userspace tools for manipulating partitions will default to expecting the information is provided in sectors. Without these changes, we're not doing that properly. Reproduced in-house trivially and was able to test these changes afterwards.

NOTE: I will be pushing another proper PR with tests after this is merged. However, I need to add 4kn emulated drives to our VM environment for the tests to be valid. This needs to be merged in time for 24.04.2 so this is why I'm opening it up without tests right now.

NOTE 2: I've found that we have a bunch of code duplication related to enumerating partition info. I will push, yet another, PR to master that consolidates this code and makes this situation much harder to hit in the future.

Original PR: #13945
Jira URL: https://ixsystems.atlassian.net/browse/NAS-129750

yocalebo added 3 commits June 28, 2024 19:50
(cherry picked from commit d0675a3)
(cherry picked from commit d7d9d88)
@yocalebo yocalebo merged commit 7ae91f2 into release/24.04.2 Jun 28, 2024
1 of 2 checks passed
@yocalebo yocalebo deleted the NAS-129750-24.04.2 branch June 28, 2024 19:51
@bugclerk
Copy link
Contributor Author

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 Jun 28, 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.

2 participants