snapraid diff ** CONNECTION LOST **

  • Over the last couple of versions of the snapraid plugin, for sure 7.0.3 and 7.0.4, I've been having issues with running diff. When I run it from the UI the output shows:

    Code
    Loading state from /srv/dev-disk-by-uuid-7c66e24c-1ae0-4cd6-a727-f9a42bfe09e3/snapraid.content...
    
    ** CONNECTION LOST **

    And when running from my nightly script I see this in the log the script generates.

    Code
    Loading state from /srv/dev-disk-by-uuid-7c66e24c-1ae0-4cd6-a727-f9a42bfe09e3/snapraid.content...
    /srv/mergerfs/Data/Backup/Scripts/snapraid-aio-script/snapraid-aio-script.sh: line 32: 981558 Killed                  $SNAPRAID_BIN -c $SNAPRAID_CONF diff

    It is sometimes successful in running the diff operation, but more often than not I get this failure. Please let me know if there's anything I can test or provide feedback on.

    OMV7 | Xeon W-1250 | 48 GB | Linux 6.5 PVE

    • Offizieller Beitrag

    What script are you running? snapraid-aio-script.sh? The only real changes I made were to the diff script included with the plugin and those were really only to hard code the snapraid binary location.

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

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


    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!

  • Hey niemer, try the latest dev branch (which I'm about to release btw). Recently, a small issue with OMV7 has been reported


    I still haven't tested OMV7, let me know if it works.

    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), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • Haha, that's me 😉


    This doesn't seem to be a predictable problem, when I ran it from the web UI yesterday, it got maybe halfway through the diff output before giving me the connection lost notification. Also, last night the script seems to have at least started, it's not yet finished as of right now.

    OMV7 | Xeon W-1250 | 48 GB | Linux 6.5 PVE

  • Haha, that's me 😉

    lol

    Also, last night the script seems to have at least started, it's not yet finished as of right now.

    Can you check the log and see what it is doing?

    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), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

    • Offizieller Beitrag

    Yeah, that's the script

    That is useful info since this script isn't related to the plugin.

    It also loses connection when I run a diff from the web ui.

    Unfortunately, that isn't enough info to help. The script isn't doing anything different. The changes just hard code paths instead of use variables. That wouldn't cause a web disconnection.



    auanasgheps this change you accepted doesn't make any sense. It is adding the config path argument but the variable is never populated. With the diff script in the plugin, it is populated by a config file passed as argument to the script call because multiple snapraid arrays are supported in the v7 plugin (and v6.2.1). Each array has its own config file.

    openmediavault-snapraid/usr/sbin/omv-snapraid-diff at master · OpenMediaVault-Plugin-Developers/openmediavault-snapraid
    OpenMediaVault plugin for SnapRAID. Contribute to OpenMediaVault-Plugin-Developers/openmediavault-snapraid development by creating an account on GitHub.
    github.com

    openmediavault-snapraid/usr/share/openmediavault/confdb/create.d/conf.service.snapraid.sh at master · OpenMediaVault-Plugin-Developers/openmediavault-snapraid
    OpenMediaVault plugin for SnapRAID. Contribute to OpenMediaVault-Plugin-Developers/openmediavault-snapraid development by creating an account on GitHub.
    github.com

    openmediavault-snapraid/usr/share/openmediavault/engined/rpc/snapraid.inc at master · OpenMediaVault-Plugin-Developers/openmediavault-snapraid
    OpenMediaVault plugin for SnapRAID. Contribute to OpenMediaVault-Plugin-Developers/openmediavault-snapraid development by creating an account on GitHub.
    github.com

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

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


    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!

  • it looks like it's getting killed by the system, or the system itself is being killed somehow, I've seen one or the other of these show up in my logs since the 19th of February, it was fine before then.


    /srv/mergerfs/Data/Backup/Scripts/snapraid-aio-script/snapraid-aio-script.sh: line 32: 143237 Killed $SNAPRAID_BIN -c $SNAPRAID_CONF diff


    Loading state from /srv/dev-disk-by-uuid-7c66e24c-1ae0-4cd6-a727-f9a42bfe09e3/snapraid.content...

    Caught SIGTERM, killing child: 38813


    If I run a diff using snapraid -c /etc/snapraid/omv-snapraid-f83da35f-74e1-4683-b6bb-6c58bfb137fd.conf diff from a terminal it completes as expected.

    OMV7 | Xeon W-1250 | 48 GB | Linux 6.5 PVE

    • Offizieller Beitrag

    it looks like it's getting killed by the system, or the system itself is being killed somehow

    Usually that happens when your system is running out of memory.

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

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


    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!

  • 🤔 that might be the culprit here. Are there minimum hardware requirements recommended with snapraid in OMV?


    I have a few VMs in addition to OMV running on my system and I've allocated only 4GB of ram to OMV, I'll try 8 and see if that makes a difference.

    OMV7 | Xeon W-1250 | 48 GB | Linux 6.5 PVE

  • auanasgheps this change you accepted doesn't make any sense. It is adding the config path argument but the variable is never populated. With the diff script in the plugin, it is populated by a config file passed as argument to the script call because multiple snapraid arrays are supported in the v7 plugin (and v6.2.1). Each array has its own config file.

    I'll add instructions how to configure it. Additionally, if here's only one array we should be fine I guess.


    niemer run cat /proc/meminfo and see how much you have left.

    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), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

    • Offizieller Beitrag

    Additionally, if here's only one array we should be fine I guess.

    Unfortunately not. The plugin no longer creates /etc/snapraid.conf (the default). It creates config files in /etc/snapraid/.

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

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


    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!

  • niemer

    Hat das Label gelöst hinzugefügt.
  • Hi,
    I just wanted to update you on the scenario of OMV7 + AIO SnapRAID script, because I finally had the chance to look at it.


    I don't know if this was already present before our discussion, but in /etc/snapraid there's a symlink called snapraid.conf.

    In case there's only one array, which I believe fits most of the users, the symlink works perfectly and there's no need to set the specific configuration name.


    I am updating the default config file with this path, adding a comment that points to the the previous one, which is also the default SnapRAID path.


    I've also implemented a check for the SnapRAID configuration itself. Until now only the AIO script configuration was checked; if SnapRAID's config file would be missing, the script would abruptly terminate like in this discussion. Hopefully this will help!

    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), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • I don't believe that's totally correct, the symlink is named whatever you named your array, in my case it's SnapARRAY.conf

    I was pretty standard and I called my array... snapraid. lol

    Thanks for clarifying

    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), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • I was pretty standard and I called my array... snapraid. lol

    Thanks for clarifying


    Thats what my array is called as well :) First: Thank you for the script! It's really awesome.

    I've tried to use the dev branch but it still wont work:

    Code
    ## Preprocessing
    SnapRAID is not running, proceeding.
    SnapRAID configuration file not found. The script cannot be run! Please check your settings, because the specified file /etc/snapraid.conf does not exist.

    What I see is that the folder should be /etc/snapraid/... and not just /etc?

  • Thats what my array is called as well :) First: Thank you for the script! It's really awesome.

    I've tried to use the dev branch but it still wont work:

    Code
    ## Preprocessing
    SnapRAID is not running, proceeding.
    SnapRAID configuration file not found. The script cannot be run! Please check your settings, because the specified file /etc/snapraid.conf does not exist.

    What I see is that the folder should be /etc/snapraid/... and not just /etc?

    Thank you for the kind words :)


    If you open the script config file, you will find this new section:

    Bash
    # SnapRAID configuration file location. The default path works on most
    # installations, including OMV6.
    # If you're using OMV7, you must manually specify your config file, which is
    # located in /etc/snapraid/
    # SNAPRAID_CONF="/etc/snapraid/snapraid.conf"
    SNAPRAID_CONF="/etc/snapraid.conf"


    We are working on a solution that will automatically pick the SnapRAID config file if there's only one, but it's not ready yet. In the meantime, you have to make this configuration.

    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), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • Aaah, thats why I couldnt find it :) In the older version it was right at the bottom! Thanks :) Should have read the whole thing..sorry !

    That did the trick.


    [edit]

    There was an error after all.. Running it from the schedulded task GUI in OMV 7 I get:


    ./root/Scripts/snapraid-aio-script.sh: line 791: [: : integer expression expected

  • I've created this issue on github, let's discuss it there so we don't go off topic here.

Jetzt mitmachen!

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