[HowTo] SnapRAID in OMV

  • Code
    /usr/sbin/omv-snapraid-diff: line 365: [: too many arguments

    I had this same error and found that my snapraid diff was definitely failing.
    Try ssh into the box and going to /usr/sbin and running "sudo omv-snapraid-diff".
    Mine failed with an error writing to a content file due to a read-only file system (my cause was a faulty SATA cable causing one of the content filesystems to be locked read-only - fixed by replacing the cable and fsck).
    Another way to see if the diff is failing is checking "/var/log/snapraid.log". If you see 'Added: [] - Deleted: [] - Moved: [] - Copied: [] - Updated: []' instead of something like 'Added: [0] - Deleted: [0] - Moved: [0] - Copied: [0] - Updated: [0]', the diff is definitely failing so the script cannot parse the output correctly.

    Hmm, seems running it manually works fine with no error and an email showing what was done.


    Wonder why the cron job fails?

  • I don't get it, if I run it manually It works fine. If it runs from the cron, it errors out?? Scheduled job is run by root, so I don't think its a permission issue.


    Really stumped here.

  • Does it fail if you manually run the scheduled job?

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • No, logged in shell as root and no errors

    I meant manually from the scheduled jobs tab.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • just tried it now and it does work from the scheduled jobs tab, even got a nicely formatted email.

    So, it works every way except for letting the scheduled job run by time? Very strange. I don't even know what to check.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • maybe @Solo0815 can look at it as he modified the script??

    I understand bash script very well. If it works running from the command line and when manually run from the scheduled jobs tab, there is nothing wrong with the script. I just tried it on my test system and it works when running from schedule as well. The 17:31 entry is when I manually executed from scheduled jobs tab. The 17:33 entry is from being run by automated scheduled jobs (I changed the job from daily to specific time of 17:33).

  • any reason why you have not pushed Snapraid 11.0 from testing to stable ?

    Not really. Guess I don't think twice about using the testing repo.


    It has some interesting fixes, and features I believe, and I didn't want to enable Testing repo.

    You can enable the testing repo without installing everything from it. Most plugins aren't in both repos.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • The testing repo is for release candidates not things that should eat your data...


    11.0 is in the regular repo.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • The testing repo is for release candidates not things that should eat your data...


    11.0 is in the regular repo.

    LOL, didn't mean it that way. I hope you understand, its scary to use something which is marked as testing on Data which is very precious :)


    However, being a developer myself I understand your point of view.

  • its scary to use something which is marked as testing

    It is a bad title. I just left it for legacy reasons. For plugins that really need to be tested, I don't put them in a repo. I put the .deb in the testing folder on omv-extras for manual download and install.


    Data which is very precious

    No backup? :)


    being a developer myself I understand your point of view.

    What kind of developer? We could use more plugin developers...

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • It is a bad title. I just left it for legacy reasons. For plugins that really need to be tested, I don't put them in a repo. I put the .deb in the testing folder on omv-extras for manual download and install.

    No backup? :)

    What kind of developer? We could use more plugin developers...


    Am an Android & Linux Kernel developer.


    I also dabble in Python, For e.g. I use a python script on my RIG for controlling fan speed based on hdd temp.

  • Am an Android & Linux Kernel developer.


    I also dabble in Python, For e.g. I use a python script on my RIG for controlling fan speed based on hdd temp.

    Interesting... What about bash, php, and javascript? :D

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Sure.. I have done some websites stuff in my free time, but nothing much serious.

    I mention those three languages because those are the languages used to create/maintain the OMV plugins.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • updated the snapraid plugin and have the prehash button enabled. The diffscript doesn't actually perform a sync anymore. Here's an excerpt from the email report.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!