/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

    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
  • I suspect that all I need to do is run touch /tmp/snapraid/snapraid.out
    Is that correct?


    Is the path relative to root of boot; or root of root user?

    /tmp/snapraid/snapraid.out

    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
    • Offizieller Beitrag

    Everything in /tmp is lost after a reboot.


    /tmp is an absolute path not a relative path on linux/unix.

    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!

  • Ran touch /tmp/snapraid/snapraid.out

    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

    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
  • Everything in /tmp is lost after a reboot.


    /tmp is an absolute path not a relative path on linux/unix.


    What is SnapRaid trying to do?


    Also this OMV has upTime of over a week.

    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
    • Offizieller Beitrag

    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 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 also get this error regularly by mail:

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


    Thus, I ran this script with bash -x



    The reason for the problem is the content of the snapraid.out:

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


    And the snapraid-diff script tries:

    Code
    DEL_COUNT=$(grep -w '^ \{1,\}[0-9]* removed$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
    ADD_COUNT=$(grep -w '^ \{1,\}[0-9]* added$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
    MOVE_COUNT=$(grep -w '^ \{1,\}[0-9]* moved$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
    COPY_COUNT=$(grep -w '^ \{1,\}[0-9]* copied$' $TMP_OUTPUT | sed 's/^ *//g' | cut -d ' ' -f1)
    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

    • Offizieller Beitrag

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

    I pushed the changes and put a new package in the repos.

    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!