[HowTo] SnapRAID in OMV

  • Thanks for this clear explanation!

  • OMV 3.0.80, Snapraid 3.7.1


    After a fresh install I get this error:


    root@OpenMediaVault:/usr/sbin# omv-snapraid-diff
    /usr/sbin/omv-snapraid-diff: line 365: [: -eq: unary operator expected


    Apparently the pre-check setting has no default value set after installation. If I disable/enable it on the GUI and apply, the value gets added in the config and the above error disappears.

  • Same issue here. Also, no email is sent when daily omv-snapraid-diff fails due to this error.

  • Just got this too with everything updated and running on OMV 3, /usr/sbin/omv-snapraid-diff: line 375: [: too many arguments


    If I remember correctly this popped up a while ago and eventually got fixed, seems it might have slipped past on the last update maybe?

    • Offizieller Beitrag

    If I remember correctly this popped up a while ago and eventually got fixed, seems it might have slipped past on the last update maybe?

    I never fixed anything. I can't recreate it. All I can think is it is a wrong setting somewhere.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • Hello! I have been using snapraid for a while now but i've decided to dip my toe into using the /usr/local/bin/omv-snapraid-diff script instead, so i have 2 questions:


    1. Snapraid noob question: As i understand it, snapraid.conf is the config file for the snapraid plugin, snapraid-diff.conf is the config file for the omv-snapraid-diff script. So, if i run the omv-snapraid-diff script it will reference the snapraid.conf to know which disks to run on and which files and folders to exclude etc., correct? I don't need to worry about adding like the same exclusions in snapraid.conf into snapraid-diff.conf?


    2. Pre-hash is enabled by default in the Diff Script Settings. I've got about 18TB of data spread over 10 HDD. The first time i ran snapraid sync (on the CLI) it took about 10 hours to complete the sync. To test pre-hash+sync, I started from scratch and completely deleted all the prior content files from all my disks and the parity files from the parity disks too. I ran snapraid sync -hv, and it took about 35 hours or so to complete, of course a lot longer with pre-hash reading the data 2 times plus the actual sync. Now my question, assuming i make no changes to the data stored in my disks, will the next pre-hash+sync take as long? I know if i do a regular sync and there hasn't been any data changes since the last sync, sync will be very short (on my system about a minute or 2). But with the pre-hash+sync (again no data changes since last sync), will it take much longer to complete or will it be just as short?

  • If you don't keep the dialogue window open during a manual sync, is there any file being written to with that output? In other words, how can I tell what percentage is complete and at what rate the process is occurring? The SnapRAID log only tells me the process was started at 23:19:38 on 8/12. Is there another log that provides the verbose output of the sync command?

  • @flvinny521 - if you are running it manually locally, no I don't believe there is an output. But I do believe it logs to syslog somewhere? So you may be able to find logs in the log section and/or by searching locally on the filesystem. I'm not 100% sure. The best method is to schedule the job to run so you can see the output. Or if you'd like, you can manually run it on the command line locally and put the output to a log file for your perusal.

  • @flvinny521 - if you are running it manually locally, no I don't believe there is an output. But I do believe it logs to syslog somewhere? So you may be able to find logs in the log section and/or by searching locally on the filesystem. I'm not 100% sure. The best method is to schedule the job to run so you can see the output. Or if you'd like, you can manually run it on the command line locally and put the output to a log file for your perusal.

    I do have the scheduled diff set up, but it doesn't work (at least it didn't for me) until you've synced manually first. I have about 15.5 TB of data in my pool, so obviously this is going to take a while, but it would be nice to see how much time I've got left.


    Thinking back, you are right, I should have run it through the CLI.

  • I'm not skilled in doing it, but if you check the process tree you should see the current running process. I know it's possibly to attach yourself to that running process in the CLI if you'd like to try and view the current output? Just a thought if it's already underway. 15.5 does sound like it'll take a bit! ;)

  • I'm not skilled in doing it, but if you check the process tree you should see the current running process. I know it's possibly to attach yourself to that running process in the CLI if you'd like to try and view the current output? Just a thought if it's already underway. 15.5 does sound like it'll take a bit! ;)


    Thanks for the tip, I tried to spy on the process using strace, but the output is complete gibberish to me. Maybe somebody else has a different idea.

    • Offizieller Beitrag

    There should be a file in /tmp that has the output. Just do a recursive grep for snapraid in /tmp.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • Hello! I have been using snapraid for a while now but i've decided to dip my toe into using the /usr/local/bin/omv-snapraid-diff script instead, so i have 2 questions:



    2. Pre-hash is enabled by default in the Diff Script Settings. I've got about 18TB of data spread over 10 HDD. The first time i ran snapraid sync (on the CLI) it took about 10 hours to complete the sync. To test pre-hash+sync, I started from scratch and completely deleted all the prior content files from all my disks and the parity files from the parity disks too. I ran snapraid sync -hv, and it took about 35 hours or so to complete, of course a lot longer with pre-hash reading the data 2 times plus the actual sync. Now my question, assuming i make no changes to the data stored in my disks, will the next pre-hash+sync take as long? I know if i do a regular sync and there hasn't been any data changes since the last sync, sync will be very short (on my system about a minute or 2). But with the pre-hash+sync (again no data changes since last sync), will it take much longer to complete or will it be just as short?

    If there are no changes to your data, no sync will run and the time to complete will be zero. If there are changes, sync only prehashes the changes, so the time is very short. The initial 10 hours was the time it took to build the parity. For 18TB I'd say 10 hours was a pretty good time.

  • I've been meaning to post about something I've noticed with the diff script. It doesn't scrub every 7 days. It scrubs after 7 syncs. If no files have changed, the script (which I run daily) doesn't perform a sync, so that day doesn't count toward the 7.

  • If you want to scrub every day regardless of whether there was a recent sync or not, just create a new script to perform the scrub and put it on cron.

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

  • Thanks for keeping this plugin alive :)


    Sorry if this was already answered, but I got no hits searching.
    For various reasons I share the root of my drives and want to change the location of the snapraid.* files to a subfolder.
    Is there any supported way of making manual changes to the snapraid.conf or do I have to edit the script at /usr/share/openmediavault/mkconf/snapraid to make persistent changes?

    • Offizieller Beitrag

    Is there any supported way of making manual changes to the snapraid.conf

    No.

    do I have to edit the script at /usr/share/openmediavault/mkconf/snapraid to make persistent changes?

    That will work until there is a plugin update.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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

    Guess the more elegant solution would be to re-structure my shares and stop sharing /.

    That would be my recommendation.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

Jetzt mitmachen!

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