NAS-133888 / 25.10 / Initial round of disk enumeration improvements #15529
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We need to clean up how we enumerate disks. The SED investigations have exposed some very obvious issues in this area. This is the first step at adding stand-alone functions for this task. Please note that there is some duplicate functionality spread out all over our code in this area, but this will be used as the "source" moving forward. Most importantly, however, is that we have an oustanding SED unlock issue that we need to address but we need the
get_disks
function that I've written in here first.On an internal system with ~1.2k+ disks, this takes ~0.23 seconds to complete. That's pretty darn good since it enumerates the serial AND "lunid" information of each disk in real-time. Careful reviewers will note that it uses the udevd database which is not the end of the world. Udevd does a ton of work caching the various disk information for us in 1 place. We shouldn't throw the baby out with the bathwater just because of some (very) painful issues that we've experienced in the past.
Subsequent PRs will follow to change existing code to use this new functionality. We've chosen to do it this way since enumerating disk information is a critical part of our product.