In my experience changes to the snapraid configuration need to be done using the plugin gui. All other snapraid commands work fine from the terminal and is how I use snapraid.
[HowTo] SnapRAID in OMV
-
-
@crashtest,
found this - https://github.com/OpenMediaVa…avault-snapraid/issues/14
and your comment there "I'm fine with the /etc/default/ file and that should allow your changes to survive upgrades"
It seems that was never implemented -
@crashtest,
found this - https://github.com/OpenMediaVa…avault-snapraid/issues/14
and your comment there "I'm fine with the /etc/default/ file and that should allow your changes to survive upgrades"
It seems that was never implemented :
Again, my regrets for being misleading. I was under the (false/untested) impression that omv-mkconf snapraid would integrate manual changes to the snapraid config file.I would still try an include (*.bak) statement in the GUI. From what I've seen, changes made to SNAPRAID in the GUI are appended to the end of the config file. Since these files are parsed start to finish, it's possible that an option later in the parsing order may countermand or reset options earlier in the order.
Unfortunately, it appears that you'd have to set the same command for every drive protected. Still, it's worth a try.
-
It seems that was never implemented
There was an accepted pull request but I guess I never pushed it out because of another pull request I need to test.
-
Since these files are parsed start to finish, it's possible that an option later in the parsing order may countermand or reset options earlier in the order.
As I mentioned earlier, the later is ignored according to the manual, "Previous rules have the precedence over the later ones".
changes made to SNAPRAID in the GUI are appended to the end of the config file
Will be good to have some dummy file imported into the right place of the config, possibly with a check for file existence. This way we can just add all the necessary commands through such file. Or even 2 files - snapraid-pre and snapraid-post, to add content to the beginning and the end of the main config. Just an idea.
-
This way we can just add all the necessary commands through such file. Or even 2 files - snapraid-pre and snapraid-post, to add content to the beginning and the end of the main config. Just an idea.
That is starting to defeat the purpose of the plugin. If you are going to write most of the conf file, then you don't need the plugin. I will try to look at pushing out the new version with the pull request. Just don't use the include/exclude section and put everything in the default file if you want. OR you can blank the default file and put everything in the include/exclude section.
-
I will try to look at pushing out the new version with the pull request.
Sounds great, I'll be ready to test. Many thanks!
-
@ryecoaaron,
I noticed that the update is available and upgraded immediately. My mistake
Error during upgrade process:Code
Alles anzeigenReading package lists... Building dependency tree... Reading state information... The following packages will be upgraded: openmediavault-snapraid 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/44.0 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 61590 files and directories currently installed.) Preparing to unpack .../openmediavault-snapraid_3.7.4_all.deb ... Unpacking openmediavault-snapraid (3.7.4) over (3.7.3) ... Setting up openmediavault-snapraid (3.7.4) ... Updating configuration database ... Running migration conf.service.snapraid_3.7.4 cat: /etc/default/omv_snapraid_excludes: No such file or directory dpkg: error processing package openmediavault-snapraid (--configure): subprocess installed post-installation script returned error exit status 1 Processing triggers for openmediavault (4.1.23-1) ... Updating locale files ... Updating file permissions ... Purging internal cache ... Restarting engine daemon ... Errors were encountered while processing: openmediavault-snapraid >>> *************** Error *************** <<< ************************************* >>> *************** Error *************** <<< ************************************* >>> *************** Error *************** <<< *************************************
Then the error comes up when I'm navigating into Snapraid in the menu tree:
and here are details:
Code
Alles anzeigenError #0: OMV\AssertException: The property 'updthresh' does not exist in the model 'conf.service.snapraid'. in /usr/share/php/openmediavault/config/configobject.inc:71 Stack trace: #0 /usr/share/php/openmediavault/config/configobject.inc(186): OMV\Config\ConfigObject->assertExists('updthresh') #1 /usr/share/php/openmediavault/config/configobject.inc(271): OMV\Config\ConfigObject->set('updthresh', '0', false) #2 /usr/share/php/openmediavault/config/configobject.inc(233): OMV\Config\ConfigObject->setFlatAssoc(Array, false, false) #3 /usr/share/php/openmediavault/config/database.inc(90): OMV\Config\ConfigObject->setAssoc(Array, false) #4 /usr/share/openmediavault/engined/rpc/snapraid.inc(61): OMV\Config\Database->get('conf.service.sn...') #5 [internal function]: OMVRpcServiceSnapRaid->getSettings(NULL, Array) #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array) #7 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getSettings', NULL, Array) #8 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('SnapRaid', 'getSettings', NULL, Array, 1) #9 {main}
The rest is working fine, I only had to manually populate /etc/default/omv_snapraid_excludes
Finally, this section in /usr/share/openmediavault/mkconf/snapraid probably needs correction:
-
-
Then the error comes up when I'm navigating into Snapraid in the menu tree:
This is what I get for assuming a pull request is tested. 3.7.5 in the repo now.
Finally, this section in /usr/share/openmediavault/mkconf/snapraid probably needs correction:
What needs correction?
Also i got a lot of warnings like WARNING! Ignoring special 'socket' file 'FILEPATH' during the sync-process.
This isn't something the plugin can fix.
-
What needs correction?
with the current code we have the following line added to the config, looks strange for me
exclude /snapraid.conf*
I have no such files at / on my system, so I see no reason to exclude them.
My apologies if I'm missing something.
Thank you for the quick fix. -
with the current code we have the following line added to the config, looks strange for me
exclude /snapraid.conf*
I have no such files at / on my system, so I see no reason to exclude them.
My apologies if I'm missing something.
Thank you for the quick fix.When you put a leading slash on a file, snapraid looks at the root of the mount for each drive in the array not the absolute path in the root of the system. In my original code, I was excluding the snapraid.conf file everywhere but the pull request argued that someone may want to have a backup in a subfolder. Not sure why since it is a generated file but I really didn't care.
-
When you put a leading slash on a file, snapraid looks at the root of the mount for each drive in the array
Missed that, thank you!
P.S. plugin Information page now requires an update in regards to default excludes.
-
P.S. plugin Information page now requires an update in regards to default excludes.
While I don't mind the feature in the plugin, I would prefer people not use it since it requires the command line and really not need by 99% of users.
-
@ryecoaaron
I see your point and actually meant something different - I've got a feeling that all the defaults mentioned on the Information page are not in the config anymore, so I had to put them into /etc/default/omv_snapraid_excludes. For me it was like 'there are no exclusions by default'. Again, maybe it just me and I'm missing something -
I see your point and actually meant something different - I've got a feeling that all the defaults mentioned on the Information page are not in the config anymore, so I had to put them into /etc/default/omv_snapraid_excludes. For me it was like 'there are no exclusions by default'. Again, maybe it just me and I'm missing something
I see what you meant now. Fixed in 3.7.6 in the repo now. The default file will now be named /etc/default/openmediavault-snapraid though because it is created using the proper dpkg method.
-
Hi @all,
is there a chance that the split-parity functionality will be integrated into the omv plug-in?
Or does the CLI still have to do this and the sync/scrub script from zack must be executed?
-
is there a chance that the split-parity functionality will be integrated into the omv plug-in?
I looked at it a bit in this issue - https://github.com/OpenMediaVa…avault-snapraid/issues/12 - and it is a pain to implement. I will look at it again but not promising anything. I guess I still don't understand why it is needed. It would also be nice if the official snapraid manual had documentation on how to implement splity parity.
Or does the CLI still have to do this and the sync/scrub script from zack must be executed?
I don't actually use snapraid so not sure why zack's script is needed.
-
You would need to edit the diff script. Line 422 sends all output of the sync command to a variable and elsewhere in the script that output is included in the email.
Line 444 includes all the scrub output.
Could you describe in detail what could be done to reduce the spam with this script?
By default emails produced by this script are unreadable, the email is so long that many applications can't even load it!
Is there a way to write the output every X seconds or something similar?
Ideally I would like to see a little progress or even none, but just having the total stats.I have commented these two lines, but as expected all the output gets removed and maybe breaks something else.
The first part of the script is quite spammy too, because it lists all edited and updated files.
If this script is too hard to edit, is anybody else using a nicer one? Thanks
-
I'll have to see if I can find my edited script. I have since overhauled my system and am currently not using any script and managing snapraid manually. I think I have a backup of it though...
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!