NethServer Version: 7.3 RC3 (updated to latest updates_ Module: nethserver-base
Folks, doing the a production installation for Nethserver. Everything seems to be going as expected (I did report a firewall addition needed for what most people believe is normal VPN behavior). I installed the machine to use RAID 10 for the root and swap partitions on 6 drives. All installs and works as expect. If you look at the provided screen shot you’ll see md126 and md127 reported as RAID 1 with 6 drives).
It’s a bug in the raid status parser. When looking for raid level, it stops at the first digit.
Edit line 59 of /usr/libexec/nethserver/raid-status adding a “*” like in the following diff:
yep, it works. Would it make more sense to to make it “\d+”? I don’t think any raid name ends in a non-digit and this allows anything after the first number if my understanding of regex is correct. Anyway here is what I did which also appears to work:
- if (/^raid(\d)/) {
+ if (/^raid(\d+)/) {
Thanks for the quick response. The team will upload some code correction I expect. I’ll watch for the updates.
Hmm…mdstat doesn’t show the words “(striping)” or “(mirroring)” but I wonder how the string format of “MULTIPATH”, “FAULTY”, and “CONTAINER” are used. Never looked into this before as it is important for me till now. I’m concerned that a “*” after \d may get stray data that wasn’t intended. Wikipedia appears to be outdated. It’s weird because many net admins are reporting RAID 6 to be worse than losing data in some cases because the rebuild takes too long on larger hard drivers (2+ TB) so many are strongly advising RAID10.
and it seems to work properly. Anyone want to verify one of these alternatives and upload to the code/updates. I’m sure many admin’s want to see the correct RAID.
I don’t think that it will work with linear or multipath (I can’t test it now).
As an immediate safe fix, I’d use "/^raid(\d+)/.
We could develop a full fix for linear and multipath later, given the relatively rare usage of those modes.
Do you agree?
Not really my call, I’m just a humble tester/user but the “\d+” is certainly safe for the vast majority. I’ll run my “wordy” expression through a couple of regex testers but at least for my RAID 10 it seems to work. But as you say, the immediate safe fix of “\d+” is a safe solution and I’d have no problem with that being in the update.