-
Notifications
You must be signed in to change notification settings - Fork 598
mdraid: Add 'auto' and multiple devices support to parameter md_dev #2037
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
Conversation
Hmmm. It seems Jenkins is broken. |
This commit allows the value 'auto' or multiple devices separated by space are set in parameter md_dev. When 'auto' is assigned, mdraid RA will try to get all md arrays from mdraid_conf then assemble them automatically. If multiple devices are assigned e.g. '/dev/md2 /dev/md3', the RA will try to assemble them. The single device syntax is same as the original. To keep the code and logic simple, global varaiable RAIDDEVS is introduced to record md devices. All entry functions mdraid_(stop|start|mintor) are renamed to mdraid_(stop|start|mintor)_one which are called by new function forall(). In forall(), md_dev and devs are used by mdraid_(stop|start|mintor)_one during iterating RAIDDEVS. The original mdraid_stop_one is renamed to mdraid_stop_array for naming consistency. Signed-off-by: Su Yue <glass.su@suse.com>
6e9fa49
to
c0648ba
Compare
We might need some more checks, so I will leave this open for 1-2 weeks to let the developer of the agent review it. |
Hi. Any comment from the developers of the agent? |
Can someone fix jenkins? |
Sure. The change is pretty straightforward, and I've tested the following cases based on SLE 16 Beta3:
|
Ok with me, as it's optionally configurable (keyword 'auto') and doesn't change single array RA semantics. |
retest this please |
Ping. Can this PR be merged? |
Thanks. |
This commit allows the value 'auto' or multiple devices separated by space are set in parameter md_dev.
When 'auto' is assigned, mdraid RA will try to get all md arrays from mdraid_conf then assemble them automatically.
If multiple devices are assigned e.g. '/dev/md2 /dev/md3', the RA will try to assemble them.
The single device syntax is same as the original.
To keep the code and logic simple, global varaiable RAIDDEVS is introduced to record md devices. All entry functions mdraid_(stop|start|mintor) are renamed to mdraid_(stop|start|mintor)one which are called by new function forall(). In forall(), md_dev and devs are used by mdraid(stop|start|mintor)_one during iterating RAIDDEVS.
The original mdraid_stop_one is renamed to mdraid_stop_array for naming consistency.
Related: #1800