/tmp/snapraid/snapraid.out: No such file or directory​

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • /tmp/snapraid/snapraid.out: No such file or directory​

      Is my SnapRAID hosed?

      I have been getting worrisome eMails stating, "grep: /tmp/snapraid/snapraid.out: No such file or directory"

      This morning's eMail came with a subject of: [[…]] Cron <root@[…]> /var/lib/openmediavault/cron.d/userdefined-8f52bb69-ff4f-4cdb-8f55-005a4b63cdd3 | mail -E -s "Cron - SnapRAID - Scheduled diff." -a "From: Cron Daemon <root>" root >/dev/null 2>&1

      it read:

      grep: /tmp/snapraid/snapraid.out: No such file or directory
      grep: /tmp/snapraid/snapraid.out: No such file or directory
      grep: /tmp/snapraid/snapraid.out: No such file or directory
      /usr/sbin/omv-snapraid-diff: line 375: [: too many arguments
      OMV 4.x on intel
    • Everything in /tmp is lost after a reboot.

      /tmp is an absolute path not a relative path on linux/unix.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Ran touch /tmp/snapraid/snapraid.out

      ajaja wrote:

      I suspect that all I need to do is run touch /tmp/snapraid/snapraid.out
      Is that correct?

      root@OMV:~# cd /tmp/snapraid/
      root@OMV:/tmp/snapraid# ls
      root@OMV:/tmp/snapraid# cd
      root@OMV:~# touch /tmp/snapraid/snapraid.out
      root@OMV:~# cd /tmp/snapraid/
      root@OMV:/tmp/snapraid# ls
      snapraid.out

      Got this eMail:
      rm: cannot remove ‘/tmp/snapraid/snapraid.out’: No such file or directory
      /usr/sbin/omv-snapraid-diff: line 375: [: too many arguments
      OMV 4.x on intel
    • ajaja wrote:

      What is SnapRaid trying to do?
      This is the snapraid-diff script not snapraid itself trying to do something. I don't use it so I'm not sure why you are getting that. Maybe I can replicate it.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Hello,

      I also get this error regularly by mail:

      Source Code

      1. /usr/sbin/omv-snapraid-diff: Zeile 375: [: Zu viele Argumente.


      Thus, I ran this script with bash -x


      Shell-Script

      1. ++ grep -w '^ \{1,\}[0-9]* copied$' /tmp/snapraid/snapraid.out
      2. ++ sed 's/^ *//g'
      3. ++ cut -d ' ' -f1
      4. + COPY_COUNT=
      5. ++ grep -w '^ \{1,\}[0-9]* updated$' /tmp/snapraid/snapraid.out
      6. ++ sed 's/^ *//g'
      7. ++ cut -d ' ' -f1
      8. + UPDATE_COUNT=
      9. + _log 'INFO: SUMMARY of changes since last sync:'
      10. + [[ INFO: SUMMARY of changes since last sync: =~ ^([A-Za-z]*): (.*) ]]
      11. + PRIORITY=INFO
      12. + LOGMESSAGE='SUMMARY of changes since last sync:'
      13. + false
      14. ++ date '+[%Y-%m-%d %H:%M:%S]'
      15. ++ basename /usr/sbin/omv-snapraid-diff
      16. + echo '[2017-08-12 13:11:57] omv-snapraid-diff: INFO: '\''SUMMARY of changes since last sync:'\'''
      17. + _log 'INFO: Added: [] - Deleted: [] - Moved: [] - Copied: [] - Updated: []'
      18. + [[ INFO: Added: [] - Deleted: [] - Moved: [] - Copied: [] - Updated: [] =~ ^([A-Za-z]*): (.*) ]]
      19. + PRIORITY=INFO
      20. + LOGMESSAGE='Added: [] - Deleted: [] - Moved: [] - Copied: [] - Updated: []'
      21. + false
      22. ++ date '+[%Y-%m-%d %H:%M:%S]'
      23. ++ basename /usr/sbin/omv-snapraid-diff
      24. + echo '[2017-08-12 13:11:57] omv-snapraid-diff: INFO: '\''Added: [] - Deleted: [] - Moved: [] - Copied: [] - Updated: []'\'''
      25. ++ omv_config_get /config/services/snapraid/prehash
      26. ++ local _queryresult _rc
      27. ++ omv_debug 'omv_config_get: xpath=</config/services/snapraid/prehash>'
      28. ++ case ${OMV_DEBUG_SCRIPT} in
      29. +++ xmlstarlet sel -t -v /config/services/snapraid/prehash /etc/openmediavault/config.xml
      30. +++ xmlstarlet unesc
      31. ++ _queryresult=0
      32. ++ _rc=0
      33. ++ echo -n 0
      34. ++ omv_debug 'omv_config_get: results: query=<0> cmd=<0>'
      35. ++ case ${OMV_DEBUG_SCRIPT} in
      36. ++ return 0
      37. + '[' 0 -eq 1 ']'
      38. + prehash=
      39. + false
      40. + '[' -gt 0 -o -gt 0 -o -gt 0 -o -gt 0 -o -gt 0 ']'
      41. /usr/sbin/omv-snapraid-diff: Zeile 375: [: Zu viele Argumente.
      42. + _log 'INFO: No change detected. Nothing to do'
      43. + [[ INFO: No change detected. Nothing to do =~ ^([A-Za-z]*): (.*) ]]
      44. + PRIORITY=INFO
      45. + LOGMESSAGE='No change detected. Nothing to do'
      Display All
      The reason for the problem is the content of the snapraid.out:

      Source Code

      1. SnapRAID Job started - Sa 12. Aug 14:21:51 CEST 2017
      2. Warnings about 'Ignoring mount point' are possibly due to AUFS or mhddfs-Pooling in OMV
      3. SnapRAID DIFF started - Sa 12. Aug 14:21:51 CEST 2017
      4. Loading state from /media/7c15d186-8611-4520-85a5-2c3f1e1ff58b/snapraid.content...
      5. SnapRAID DIFF finished - Sa 12. Aug 14:23:06 CEST 2017

      And the snapraid-diff script tries:

      Source Code

      1. DEL_COUNT=$(grep -w '^ \{1,\}[0-9]* removed$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
      2. ADD_COUNT=$(grep -w '^ \{1,\}[0-9]* added$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
      3. MOVE_COUNT=$(grep -w '^ \{1,\}[0-9]* moved$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
      4. COPY_COUNT=$(grep -w '^ \{1,\}[0-9]* copied$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
      5. UPDATE_COUNT=$(grep -w '^ \{1,\}[0-9]* updated$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
      And this of course gives no result.

      I do not know, why there is no output about removed, added etc. in the snapraid.out.
      But this possibility should be caught, no?
      What could be the reason for the lacking information in snapraid.out?

      Regards,
      Hendrik

      The post was edited 1 time, last by henfri ().

    • henfri wrote:

      Can noone help?
      Since I don't use snapraid, see if the changes I made work:

      As root or use sudo
      wget http://omv-extras.org/testing/omv-snapraid-diff -o /usr/sbin/omv-snapraid-diff
      Just in case
      chmod +x /usr/sbin/omv-snapraid-diff
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

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