[Solved]SnapRaid + Unionfilesytem + Cron = snapraid sync (scheduled to run hourly?)

  • Very, very few users run split parity. Is there some reason you suggested a script for it?


    Regular script here:


    Code
    https://gist.github.com/bfg100k/87a1bbccf4f15d963ff7

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • @gderf yes I did try this method but none of them mentioned about specifically installing script for SYNC.


    If I appear to be begging forum user, to spoon feed me information, then I apologize in advance.


    As I am novice in the area of Linux, I did not want to experiment. I need to get the exact step by step details before I attempt to install it.
    otherwise I may screw this whole project, and start it all over again.


    I did some reading on this https://forum.openmediavault.o…?postID=225307#post225307
    But I stop reading on page 8 or 10, I could not remember.


    While I was searching for answer in this area, I did stumble a FAQ about inserting script at: https://forum.openmediavault.o…/5594-OpenMediaVault-FAQ/


    This is what I found.........

  • @thedarkness OK thanks for your steps given, most appreciated, I will give it a try. :thumbup:

  • @thedarkness OK thanks for your steps given, most appreciated, I will give it a try. :thumbup:

    You do not want to run a split parity SnapRaid helper script unless you are configured for split parity disks , and you aren't. You are running multiple parity disks. These are completely different things.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Well... Because he has two parity drives, so I assumed he has this kind of config.

    Multiple parity drives and split parity drives are completely different things.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Multiple parity drives and split parity drives are completely different things.

    @gderf Ok thanks for the heads up! :thumbup:


    In that case, I have 2 options:
    A) I will try the very first script that @thedarkness shown me earlier: https://forum.openmediavault.o…-new-snapraid-script-txt/
    or
    B) I will stick with manual SYNC and SCRUB for simplicity sake.
    SYNC once a week
    SCRUB once every 2 weeks


    I will be most likely stick with option B) just to make my life simple.


    Thank you all who has provided valuable advice to my question/problem. :)

  • Multiple parity drives and split parity drives are completely different things.

    Thanks for the heads up, I completely misunderstood it. Right so is he running 2 parity disk to be fault tolerant with 2 drives?
    I'll get the script updated for this scenario too. I tried many things and for my use this script the best: set and forget, and if something goes wrong, a daily script mail will tell me.

    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!

  • He is running two parity disks.


    How do I know this? Two ways. He posted his disk configuration. And the current OMV SnapRAID plugin does not support split parity, and he didn't mention configuring it by hand which would be required for split parity.


    I already posted one of the available proper scripts for standard implementations. Google for more.


    The larger problem with things like this is that many just don't understand what it does and more importantly its limitations. And of course very, very few have ever simulated a disk failure and actually tried to recover from it.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • @wepee


    Try the script I have attached, should be working with your setup.

  • You should also post the source of the script. Please provide the URL.

    I think the source of the script is within the txt file:
    # Inspired by Zack Reed (http://zackreed.me/articles/83-updated-snapraid-sync-script)
    # Modified version of mtompkins version of my script (

    Externer Inhalt gist.github.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.
    )
    # Updated by sburke to fix behavior on Debian 10

  • @wepee


    Try the script I have attached, should be working with your setup.

    @thedarkness thank you for following this thread, and updated the script. :thumbup:


    As of now, the more I read about the comments/descriptions denoted by "#" the txt file of: snapraid script - dual parity.txt
    the more silly question that I have in mind.
    I decided to save it for another day.
    When I am more a pro in writing bash scripts then I may understanding better.
    Bottom line is, I simply not confident in running the script unless I get a FULL understanding it works.
    What is the pitfalls? what is the thing that I need to look for?
    It is better to get a full picture on how whole the script works, rather than install it and run it blindly without
    knowing the consequence. Otherwise, I will back to the forum asking for help if I do run into trouble. :/

  • You should also post the source of the script. Please provide the URL.

    Woops, I forgot.
    It's from here https://zackreed.me/snapraid-split-parity-sync-script, but does not work as-is, you need to change some things you can find in the comments in order to get it working on OVM5 and dual parity or single parity.

    I understand your point. The goal of the script is actually to make things easier for somebody who does not want to run many commands manually.
    As I've given the script to you, it will always run a sync whenever the script is triggered. This **could** be an issue if you deleted many files by mistake, but you should backup your files offsite anyway. If you want you can enable trigger conditions based on a number of deleted or updated files: if the threshold is reached, sync will not be triggered.
    The best for you is to read and ask questions, I will answer when I have time, but I believe the information in the ##comments is well documented.
    Also you could test this whole thing in a Virtual Machine with a bunch of virtual drives configured and with some files copied on them.

    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!

  • I think the source of the script is within the txt file:# Inspired by Zack Reed

    Nope.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    Einmal editiert, zuletzt von gderf ()


  • You are not going to find that kind of insight within the script. It is written by a chain of highly experienced users of the software and its audience is those who have at least a working understanding of the software.


    You need to read the SnapRAID documentation for this, not the script.


    Code
    https://www.snapraid.it/


    And I'll go even further. You will be making a major mistake by relying on software like SnapRAID without actually testing it to determine that you can recover from lost files or a lost disk. And the time to learn how to do this is before you really need to do this.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • yeah the first time you experience a failure can be pretty nerve wrecking. Being prepared and knowing what to do would be ideal, even though I didn't. I had a couple drives fail sooner than I had anticipated. I say 'fail' but they were only in a pre-fail state so I was able to rsync to a new drive and didn't really require a rebuild from parity. Just a few files got corrupted and snapraid fixed them up.

  • That is a pretty straightforward guide although I prefer to not run the snapraid commands from the webUI because in real life with large disks they take many hours to complete. I use the webUI to manage the disks and and snapraid configuration, then run the snapraid commands from a SSH terminal. Just my preference.

Jetzt mitmachen!

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