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

Remove raid0 dev restriction & tidy pool dev fencing code #2385 #2500

Conversation

phillxnet
Copy link
Member

We previously blocked raid0 disk removal outright. Move to allowing device removal, as per all other profiles, within profile limits.

Abstract btrfs-raid profile minimum device count & maximum device missing info and use the former through-out the fencing code. Adapt all related tests to the newly uniform error messages that result from hitting the remaining revised limitations.

These code changes are also intended to ease our adoption of raid1c3 & raid1c4 profiles. And form the initial awareness of these newer btrfs-raid profiles.

Fixes #2385

Testing

An existing subtest was modified from the older behaviour to what is proposed, and a previously missing sub-test was added for below minimum dev count on the single profile.

With the proposed changes we have the following:

cd /opt/rockstor/src/rockstor
export DJANGO_SETTINGS_MODULE=settings
poetry run django-admin test
...
.....................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 245 tests in 32.836s

OK

We previously blocked raid0 disk removal outright. Move to
allowing device removal, as per all other profiles, within
profile limits.

Abstract btrfs-raid profile minimum device count & maximum
device missing info and use the former through-out the fencing
code. Adapt all related tests to the newly uniform error messages
that result from hitting the remaining revised limitations.

These code changes are also intended to ease our adoption of
raid1c3 & raid1c4 profiles. And form the initial awareness of
these newer btrfs-raid profiles.
@phillxnet
Copy link
Member Author

While working on #2394 I have need for a structure created in this pull request. As we are in testing still (although mid RC phase) I think we are OK to merge this as-is. I do see a comment typo but I may end up moving the associated new structure in my current issue anyway, so can sort the typo in the process.

I'll leave merging for a little longer in case anyone is mid review.

@FroggyFlox
Copy link
Member

@phillxnet ,
Note that I'm unfortunately too short on time for the moment to review this PR so please do not wait for me if that was the case.

@phillxnet
Copy link
Member Author

@FroggyFlox Thanks, and no worries. Cheers for the heads up. I just didn't want to merge it if anyone was mid review.
I'll likely merge tomorrow now and take it from there as I need to build on this for the sighted issues fix.

@phillxnet phillxnet merged commit f397bc9 into rockstor:testing Feb 25, 2023
@phillxnet phillxnet deleted the 2385_Revise_draconian_raid0_disk_removal_restriction branch February 25, 2023 11:51
@phillxnet phillxnet mentioned this pull request Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants