-
Couldn't load subscription status.
- Fork 3
Adding RAID SHR and correcting some bugs :) #35
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #35 +/- ##
============================================
- Coverage 100% 65.1% -34.9%
- Complexity 74 132 +58
============================================
Files 8 10 +2
Lines 187 341 +154
============================================
+ Hits 187 222 +35
- Misses 0 119 +119
Continue to review full report at Codecov.
|
dddb95f to
0bd6814
Compare
|
@tigerblue77 do you need any help here? I notice there are a few failing tests. For instance in the RaidTenTest, you changed the capacity of one of the drives in the test, but didn'tupdate the result. |
|
@kevinquinnyo hi, no thank you :) with my studies I didn't have time to repair RAID 10 until now but I'll do ASAP Failing tests are corrects, I edited them because they were wrong I think ;) And I changed a drive to make an heterogen drive array but, as there is no pair for this drive size in the array, the RAID10 will only use the size of the second biggest drive For example if you have 3 1tb drives and one 2tb drive, the raid 10 will create 2 raid 1 of 1 tb usable and 1 tb for mirroring (so 1tb will stay unused on the 2tb drive) and merge them in a RAID 0 (as raid 10 is in fact RAID 1+0) |
Oh I see. A RAID 10 is basically invalid with 5 drives. The code is summing the capacity of all 5 (truncating the 2048 to 1024) and resulting in So that is a bug. Good catch. I haven't looked at this code in a long time. |
|
Yes that's it. I think "invalid" is not the right term, as the RAID will be created but as it needs pairs of drives, one drive of the five composing the array will not be used :) Thank you :) no problem |
|
I wonder if this library should throw an exception if you pass 5 drives to a raid 10, unless you set one of the drives as a hot spare? Should I never gave this too much thought and I'm not super knowledgable on RAID. What do you think? edit: my instinct is that we should |
Sorry but I think it's not a good idea as it is not impossible to build a RAID 10 with 5 drives... 1 drive will stay unused and will not be part of the RAID but it's still possible.
No problem :) I think it should be a drive's property (as boolean) because it is more logical and if it's an array, when a drive is failling, you're obliged to remove the object from the spare array to move it to the used drives array... It's not efficient ;) |
|
I don't know why "Travis CI" check is failing on GitHub when I push... Could you look at this please ? :) I'm working on RAID 10... The algorithm to calculate the capacity is the same as the one used to calculate de parity size, how would you do to avoid code duplication ? :) edit: Normally everything is now working great, don't hesitate to ask me for changes or if you don't understand some of my programming choices :) Do you have ideas of new functionnalities ? |
682047b to
db9399e
Compare
|
Hi @kevinquinnyo, Did you have time to look at the changes I made ? :) |
No I'm really sorry! I have been really busy with work and planning a wedding. I am looking forward to finding some time to look through this and help you land your changes though. |
No problem ! I'll wait for your return, there is no emergency :) |
No description provided.