-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
dRAID vdev driver #5841
dRAID vdev driver #5841
Conversation
@thegreatgazoo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @behlendorf, @ahrens and @ironMann to be potential reviewers. |
@kpande The draidcfg can be easily integrated into zpool create. There's a separate config file now, because a) for bug reporting the vdev config can be easily uploaded, and b) I'm still improving the code so I need a way to create the configuration without actually creating a pool. This is where I'd need feedback from the community, especially admins. If the community doesn't want a separate step, then it can be removed. I'm fine either way. As to the mirror rebuild, I chose rebuild by default simply that's the easiest way for me to test. I want to change the default back to resilver, because in general I want this patch to have 0 effective change unless draid is in use or the user has explicitly requested new mechanism. For example, if rebuild is the default for mirror, it may break user scripts that grep zpool status for string "resilver" or poll zpool events for a resilver done event. |
@thegreatgazoo I think there should not be a separate utility; |
@ahrens Alright, I'll integrate it into zpool create, and I'll keep draidcfg for a while as I need it to create test configurations without creating a pool. |
I think it's important that creating a draid pool feels the same as creating any other type of configuration. That means we need to somehow specify parity, spares, blocks/stripe, and vdevs as part of
For example, to create a 17 device draid pool with single parity, two spares and four blocks/stripe you'd issue the following command.
If the specified pool configuration doesn't satisfy the '(vdevs - spares) % (parity + blocks/stripe) == 0' requirement the command should fail with a useful error message describing the issue. Furthermore, what would be really slick from an admin perspective is if spares and blocks/stripe were optional. We could have spares default to 1 when not specified and then make a best effort to calculate a reasonable blocks/stripe which satisfies the constraint. For example, the following command would create a 21 device draid pool with triple parity (draid3), a default single spare and the smallest block/stripe value which works. In this case 1.
Or if you wanted three spares, in which case blocks/stripe would be still be 1.
What I like about this is that it's consistent with the existing syntax everyone is familiar with. Which I suspect means it should be reasonably straight forward to fit this in to the existing parser. Plus it allows knowledgeable users to specify the exact configuration they want and less savvy admins to quickly get a functional, but perhaps non-optimal, pool. @thegreatgazoo would something like this be workable? Did I overlook something? Are there some alternate suggestions?
A potentially nice way to handle this would be to make the existing zpool create dry-run option (-n) draid aware.
|
@behlendorf I generally agree with what you're suggesting. However a few details: As I understand it, "blocks/stripe" ( Increasing BPS (decreasing N) causes better space efficiency, because it increases the ratio of data to parity. Decreasing BPS (increasing N) causes better random-IOPS performance, and better compression ratio, because the random IOPS of the whole DRAID is approximately I agree that I think that the default should be to maximize BPS (i.e. Minimizing BPS ( We may want to have the syntax be I could be convinced that we should do something more complicated when given enough disks that For example, maybe DRAID1 could allow BPS as low as 10, DRAID2 -> 20, DRAID3 ->30. With this BPS, the parity is only 10% of the total space so perhaps further improvement in space efficiency is not worth it. But I would still hesitate to do this, for 2 reasons:
|
I agree
I think a first step would be to agree on the syntax to specify all parameters and require all to be mandatory. Then we can decide whether to allow any to be optional, and if so how to come up with a sensible default.
So we'd only need to specify |
Sounds good to me.
Or specify |
Up to and including b6ca80d723b4b9139d3133114a17d019149eb1a4 Signed-off-by: Isaac Huang <[email protected]>
@thegreatgazoo won't you mind if I rebase it on master? I'll use it at work soon. |
@gmelikov The code in the current PR is fairly outdated. The latest code depends on metadata allocation class PR from @don-brady to manage dRAID mirror metaslabs. We're working on getting both PRs refreshed, but it'd be more work than a simple rebase. Stay tuned! |
@thegreatgazoo thanks, it would be great to test it! |
@thegreatgazoo can I help with tests? Now I want to add some to ZTS (main thought - change default pool to draid). If you already have any - can I ask for them? Thank you! |
A great place to start would be to update the test cases verify existing functionality on striped, mirrored, and raidz pools by adding draid to the list. |
@behlendorf Is it a good idea to add variable VDEV_TYPE or similar to run main part of tests on needed VDEV type? |
@gmelikov that's not a bad idea, but I don't this it's necessary. We can just update the needed test cases directly, we're not going to be adding new top-level vdev types very often. |
@gmelikov and @behlendorf I'm waiting for #5182 to merge before I can update this PR. The latest dRAID code depends on #5182 to manage its internal mirror metaslabs. As to testing, we've modified ztest to support dRAID pools, and I believe our test team modified ZTS as well. When I refresh this PR, I'll include the test-related changes too. |
@thegreatgazoo thanks, waiting for it! I'll have some tests for draid, will make a PR after this one merged if there will be some differences. |
The latest code has been moved to #7078 |
The latest code has been moved to #7078
This patch implements the dRAID vdev driver and a new rebuild mechanism (#3497). Most features are complete, except:
However, this is still work in progress: user interface may change, on-disk format may change as well. Also, there's still some crufty hacks I'm going to clean up.
I've added a dRAID howto. It contains only basics for now, but I'll continue to update the document.
Please report bugs to the dRAID project.
Comments, testing, fixes, and porting are greatly appreciated!
Code structure:
The goal is to change existing code in a way that when draid is not in use the effective change is none. Though there's still some cleanups needed.