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

Nexus: Account for all storage on U.2s #6110

Open
smklein opened this issue Jul 17, 2024 · 0 comments
Open

Nexus: Account for all storage on U.2s #6110

smklein opened this issue Jul 17, 2024 · 0 comments
Labels
nexus Related to nexus storage Related to storage.

Comments

@smklein
Copy link
Collaborator

smklein commented Jul 17, 2024

In the context of the "Support Bundles" project, it is currently difficult for Nexus to answer the question "will a particular U.2 have enough space to store a support bundle of a particular size?".

More generally, Nexus may ask "If I provision a resource to a U.2, and I want it to have some minimum / maximum space, will it fit?

We need the following tools to answer this question:

  1. Nexus wants Sled Agent: API to manage datasets independently of zones #6042 to request datasets explicitly, rather than implicitly. This should apply to all datasets (see: Cleanup: Use explicit dataset request API to request zone datasets #6043)
  2. Nexus needs Sled Agent: Allow the setting of quotas and reservations on datasets #6107 , to know that provisioned datasets won't overflow their expected capacities.
  3. Nexus would like to ensure that all storage usage within U.2s is tracked, to some degree. This depends on e.g. Dataset accounting: VMM zone filesystems should be explicitly requested #6108, Dataset accounting: Probe zone filesystems should be explicitly requested #6109
  4. Nexus needs to keep track of the expected quotas/reservations given to each U.2, and compare the usages of "all datasets on a zpool, so far" when making adjustments to the allocations.

It would also be extremely nice to have commands through omdb that can display these numbers, and give context on what they mean.

As prior art, the "region allocation" query for crucible accounts for some of this information: https://github.com/oxidecomputer/omicron/blob/main/nexus/db-queries/src/db/queries/region_allocation.rs

  • It considers the "zpool size usage" to be "the sum of all datasets on that pool". This currently only considers other Crucibles, so it's not a true picture of the world, but an approximate one:
    old_zpool_usage AS (
    SELECT
    dataset.pool_id,
    sum(dataset.size_used) AS size_used
    FROM dataset WHERE ((dataset.size_used IS NOT NULL) AND (dataset.time_deleted IS NULL)) GROUP BY dataset.pool_id),");
  • It considers the "zpool capacity size" based on output from inventory, and checks that "old usage + proposed new usage <= total usage":
    (old_zpool_usage.size_used + ").param().sql(" ) <=
    (SELECT total_size FROM omicron.public.inv_zpool WHERE
    inv_zpool.id = old_zpool_usage.pool_id
    ORDER BY inv_zpool.time_collected DESC LIMIT 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nexus Related to nexus storage Related to storage.
Projects
None yet
Development

No branches or pull requests

1 participant