[HowTo] SnapRAID in OMV

    • Offizieller Beitrag

    @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.

    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • 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.

    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • @ryecoaaron,
    I noticed that the update is available and upgraded immediately. My mistake ;)
    Error during upgrade process:




    Then the error comes up when I'm navigating into Snapraid in the menu tree:

    Code
    The property 'updthresh' does not exist in the model 'conf.service.snapraid'.

    and here are details:

    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:


    Code
    # Add dynamic default excludes
    cat <<EOF >> ${SNAPRAID_CONFIG}
    exclude /${SNAPRAID_FILENAME}*
    EOF
    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • @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 ;)

    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • 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?

    • Offizieller Beitrag

    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.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    Einmal editiert, zuletzt von ryecoaaron ()

  • 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.

    Code
    $SNAPRAID_BIN sync${prehash} >> $TMP_OUTPUT

    Line 444 includes all the scrub output.


    Code
    $SNAPRAID_BIN scrub -p $SCRUB_PERCENT -o $SCRUB_OLDER_THAN_DAYS >> $TMP_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

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!