[HowTo] SnapRAID in OMV

  • You can also exclude folders where you know you'll unpack temporary files, and will be excluded by the parity.


    This is managed by SnapRAID itself and can be achieved via OMV SnapRAID Settings.

    Thanks, just few days as use this FS, did not know all details.


    BTW, for status and smart I created a short shell script, because wanted to receive details in telegram:

    Bash: snapraid_status.sh
    snapraid smart | tee /home/snapraid_log/smart.log
    snapraid status | tee /home/snapraid_log/status.log
    
    /home/telegramSend.sh "$(date "+%H:%M:%S  %d.%m.%y")"$'\n'"Snapraid SMART"$'\n'$'\U2611'$'\n'"$(cat /home/snapraid_log/smart.log)"$'\n'$'\U2705'
    
    /home/telegramSend.sh "$(date "+%H:%M:%S  %d.%m.%y")"$'\n'"Snapraid Status"$'\n'$'\U2611'$'\n'"$(cat /home/snapraid_log/status.log)"$'\n'$'\U2705'

    Maybe will be useful for someone.

  • d13m looks nice! You can make a PR on GitHub and we'll look into it.


    To make it really effective, I think we should compare the previous smart report and only produce an output if there's a difference. But requires some knowledge and I'm still new to bash.

    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!

  • So I'm looking to use this plugin on top of a BTRFS setup now that the filesystem has gotten better integration with OMV's stock GUI. The Snapraid documentation mentions needing to "build SnapRAID with the libblkid library to get UUID support", but it doesn't seem like they've updated their info in years. Is that something that's included in this plugin now?


    It also says multiple BTRFS snapshots aren't supported. Could I safely use the new BTRFS snapshot system in the GUI if I added a Snapraid exclusion for the ".snapshots" directory? I know other tools like Snapper exist but I'm not really interested in doing anything outside the OMV family. I just want BTRFS snapshots to do their thing and Snapraid to do its thing, and I'd like to make sure there's no compatibility issues there. Thanks

    • Offizieller Beitrag

    The Snapraid documentation mentions needing to "build SnapRAID with the libblkid library to get UUID support", but it doesn't seem like they've updated their info in years. Is that something that's included in this plugin now?

    Never looked. I build the snapraid binaries with the default configure included in the snapraid source. But after reading the History file in the source, I would need libblkid-dev installed on the server. I don't. So, it seems it is not enabled. I just built the snapraid amd64 package with libblkid-dev installed and put it in the testing repo.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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

    So I need to do this to upgrade to snapraid 6.2 for split parity support but I don’t have the option to enable the test repo. Perhaps I’m doing something wrong.

    My message was from a long time ago. I got rid of the option to add the testing repo because too many people just check all of the boxes and end up with testing versions they don't want.


    You can install with:


    wget https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/debian/pool/main/o/openmediavault-snapraid/openmediavault-snapraid_6.2.1_all.deb

    sudo dpkg -i openmediavault-snapraid_6.2.1_all.deb

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • You are fantastic! Much appreciated :)

  • The order I run is:
    snapraid touch; snapraid sync -l snapsync.log


    snapraid -p 100 -o 13 scrub
    snapraid -e fix

    crashtest May I bother with a few questions?

    (the thread is quite old so please let me know if there are better alternatives in the GUI)


    1. where will the snapsync.log be saved? How do I access it? And will it be overwritten with each run to prevent the space being unnecessary occupied?

    2. How should I set the settings below to be in harmony with the Scheduled tasks above?

    Also I see reference of the sync process but I do not see any checkbox or schedule for it. Can the scripts above now be achieved also through the GUI with the new plugin version? In the "Scheduled diff" maybe? Is it also running a sync?


    And at the installation the plugin created a scheduled task with this command:

    for conf in /etc/snapraid/omv-snapraid-*.conf; do /usr/sbin/omv-snapraid-diff ${conf}; done

    aren't they redundant?


  • Hello ! I have the same question as highlander0681.

    Moreover, I don't understand why don't I have a "tools" button here :

    +


    Is that a new way the snapraid plugin is working, comparing to the OMV 7.X version ? How to plan the syncs, then ?


    For example, on OMV 6.X, the "tools" button was here :

    fetch.php?w=800&tok=17ade4&media=omv6-plugins-snapraid-05.jpg

    • Neu
    • Offizieller Beitrag

    Moreover, I don't understand why don't I have a "tools" button here :

    +


    Is that a new way the snapraid plugin is working, comparing to the OMV 7.X version ?

    The 6.2 and 7.x version of the snapraid plugin added support for multiple arrays. Since the "tools" operate on an array not an individual drive, the tools menu were moved to the array tab. How those tools work has not changed.


    where will the snapsync.log be saved? How do I access it? And will it be overwritten with each run to prevent the space being unnecessary occupied?

    Nothing in the plugin creates a snapsync.log.


    If you run commands outside of the plugin like the ones you quoted, you determine where the log will be. But those commands will have to the point to the array's config file now since /etc/snapraid.conf is no longer used.


    The new snapraid config files live in /etc/snapraid and there is a symlink using the array's name to the actual config. Here is my dev system:


    Code
    aaron@omv7dev:~$ ls -al /etc/snapraid
    total 32
    drwxr-xr-x   2 root root  4096 Mar  8 10:43 .
    drwxr-xr-x 133 root root 12288 Apr  1 06:03 ..
    -rw-r--r--   1 root root  1016 Mar  8 10:43 omv-snapraid-193819d0-f5b1-4926-9ccc-d56c877a4335.conf
    -rw-r--r--   1 root root  1016 Mar  8 10:43 omv-snapraid-7ebf61f2-7370-4152-bf78-6a2e01249e01.conf
    lrwxrwxrwx   1 root root    68 Mar  8 10:43 s1.conf -> /etc/snapraid/omv-snapraid-7ebf61f2-7370-4152-bf78-6a2e01249e01.conf
    lrwxrwxrwx   1 root root    68 Mar  8 10:43 s2b.conf -> /etc/snapraid/omv-snapraid-193819d0-f5b1-4926-9ccc-d56c877a4335.conf


    If I want to run crashtest's commands on my array named s1, those commands would look like:

    Code
    snapraid touch -c /etc/snapraid/s1.conf
    snapraid sync -c /etc/snapraid/s1.conf -l snapsync.log
    snapraid -c /etc/snapraid.conf -p 100 -o 13  scrub
    snapraid -c /etc/snapraid.conf -e fix

    The snapsync.log file in the second command will be in the current directory when you execute the command.

    • Neu
    • Offizieller Beitrag

    (the thread is quite old so please let me know if there are better alternatives in the GUI)

    That is definitely an old post. It might have been before the GUI plugin.

    1. where will the snapsync.log be saved? How do I access it? And will it be overwritten with each run to prevent the space being unnecessary occupied?

    That was my arbitrary name for the log, as I named back then. I believe it went to /root because the command line was run by the root account. If using the command line to run a sync, a path could be specified for a log file such as snapraid sync -l /var/log/snapsync.log

    2. How should I set the settings below to be in harmony with the Scheduled tasks above?

    I don't use those particular settings anymore, however:



    Also I see reference of the sync process but I do not see any checkbox or schedule for it. Can the scripts above now be achieved also through the GUI with the new plugin version? In the "Scheduled diff" maybe? Is it also running a sync?

    The selections in the above GUI page constructs the needed command(s) and switch(es) for the sync command. The Schedule Diff button (above) runs the commands on a schedule. The Diff (Differences) thresholds are checked before a sync and scrub are ran.

  • The selections in the above GUI page constructs the needed command(s) and switch(es) for the sync command. The Schedule Diff button (above) runs the commands on a schedule. The Diff (Differences) thresholds are checked before a sync and scrub are ran.

    crashtest thank you!

    So if understand correctly:

    -with these GUI settings both sync and scrub are ran every 13 days

    -I can use Schedule diff to plan a diff(only) in addition to that done every 13 days

    -I no longer need any other scheduled tasks or checks


    Zitat

    I don't use those particular settings anymore

    why? what do you use instead?

    • Neu
    • Offizieller Beitrag

    why? what do you use instead?

    There are a number of variables. Sync, for new, changed and deleted files, tends to be pretty fast. On the other hand, the size of the data store, speed of the drives, USB connected drives, etc., effect the length of time required for a scrub. To avoid issues (errors) with a sync and the following scrub, it's best to run and automated Diff after-hours when the server is not being used. After-hours, where user access is unlikely, may mean something between midnight to 06:00AM. If the data store is large, requiring several hours to complete a scrub, scrubbing less than 100% of the store may be necessary.

    With the above in mind, I'm of the opinion that scrubbing 25% of the store, once a week, is enough. In a month's time, all is checked for data integrity. Along with keeping an eye on SMART data, I believe that's enough.

    What I keep an eye on are differences thresholds, when setting up Diff. (Changed, new and deleted files.) While a reasonable number of changes must be allowed or the script won't complete (negating automation), excess changes are an indication that a closer look is needed. For automation purposes, I've found that 100 each, per week is enough. Otherwise, if I add lots of files or do a large delete, I run a sync manually.

    In the bottom line, it's best to read up on what SnapRAID does, try to get a good understanding of how it works, then set it up according to what works best for you.

  • Thank you very much for your help, it is perfect now ! :)


  • I don't trust the automation either. I run a diff and sync manually after adding/removing files on the server. I manually run scrubs periodically, not as often as I probably should.

    • Neu
    • Offizieller Beitrag

    Seems like the plugin (I assume that is what you mean by automation) could be enhanced if people provided suggestions.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

    • Neu
    • Offizieller Beitrag

    As it was already mentionned in this thread a long time ago by others, i personnaly use the snapraid-aio-script.

    Easy configuration, customisation and nice report.

    It has been updated to manage snapraid arrays.

    Just that no one wants to help integrate that with plugin.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

Jetzt mitmachen!

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