Snapraid UI - Cannot Make Changes, Error 500

  • I recently upgraded from OMV 6 to 7 via omv-release-upgrade. Everything seemed to work fine. From the Snapraid UI, I saw my data and parity disks intact. Now that I need to change data/parity disks, I keep getting this error:


    Code
     500 - OK
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color snapraid 2>&1' with exit code '1': debian: Data failed to compile: ---------- Rendering SLS 'base:omv.deploy.snapraid.default' failed: Jinja error: drives.drive[6].paritynum: The value 7 is bigger than 6. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 477, in render_jinja_tmpl output = template.render(**decoded_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "<template>", line 18, in top-level template code File "/usr/lib/python3/dist-packages/jinja2/sandbox.py", line 396, in call return __context.call(__obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 149, in __call__ return self.loader.run(run_func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1234, in run return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^... 


    I attached a full log from syslog when the error happened in the UI.


    My issue seems to be isolated to the Snapraid UI, and it may have something to do with the path changes in Snapraid's config. Prior to OMV 7, my config has always been in /etc/snapraid.conf. ryecoaaron mentioned in the other threads that the new path is now in /etc/snapraid, and the config name seems to resemble omv-snapraid-UUID_of_array.conf. These folder and file did not exist.


    I tried to fix the path, but I was unsuccessful. I looked for the UUID of my array in /etc/openmediavault/config.xml. It was named array1 in the Snapraid UI:


    Code
    # cat /etc/openmediavault/config.xml | grep -B 2 array1
            <array>
              <uuid>114a88d2-53ed-11ed-8eee-b3f2573b9c38</uuid>
              <name>array1</name>
    
    # mkdir /etc/snapraid
    # cat /etc/snapraid.conf > /etc/snapraid/omv-snapraid-114a88d2-53ed-11ed-8eee-b3f2573b9c38.conf

    However, it didn't change anything. I am still getting the same error from the Snapraid UI. Hopefully, the maintainer or someone who had the same issue can give me guidance on how to fix this without starting from scratch/reinstalling.

    Snapraid plugin: openmediavault-snapraid 7.0.6

    • Offizieller Beitrag

    What is the output of: sudo omv-showkey snapraid

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

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


    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!

  • Here's the output:



    Please note that the output above includes modifications that I have done to snapraid.conf and config.xml after realizing that I can't save any changes from the Snapraid UI. I have a backup of the original config.xml prior to the upgrade from OMV 6 to 7.

    • Offizieller Beitrag

    Please note that the output above includes modifications that I have done to snapraid.conf and config.xml after realizing that I can't save any changes from the Snapraid UI. I have a backup of the original config.xml prior to the upgrade from OMV 6 to 7.

    I need the config in the broken state. I guess if you post the omv6 config prior to the upgrade, i can figure something out.

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

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


    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!

  • I need the config in the broken state. I guess if you post the omv6 config prior to the upgrade, i can figure something out.

    This is the config from March 6th (last modification time). If I remember correctly, I did the in-place upgrade on March 8th. Did <arrays> already exist in the previous version?


    • Offizieller Beitrag

    Did <arrays> already exist in the previous version?

    If you had enabled the testing repo and installed 6.2.x version of the snapraid plugin for the short time it was available. It looks like you did that. That version was not very well tested. So, when you upgrade to OMV 7.x, it isn't doing any upgrade for array support and you have invalid parity numbers. There are a couple of options:


    Delete the drives and re-add them in the same order in the plugin


    Manually edit the paritynum field setting it to 1 for non-parity drives and 1 thru 6 for the parity drives.

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

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


    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!

  • Manually edit the paritynum field setting it to 1 for non-parity drives and 1 thru 6 for the parity drives.

    Thanks! Fixed.


    For reference:


    1. I already recreated /etc/snapraid manually, so I had to delete the folder so that the Snapraid plugin can recreate it later:

    Code
    # rm -rf /etc/snapraid


    2. Modify the <snapraid> block of config.xml to fix the <paritynum>x</paritynum> fields.

    • All data drives should have a value of 1
    • All parity drives should have a value of 1-6, depending on how many parity disks you have.

    In my case, I have 13 data disks and 2 parity disks. So, all 13 data drives have paritynum = 1 and the 2 parity drives have paritynum = 1 and paritynum = 2 respectively.


    3. Reload Snapraid UI from the web browser. Make changes if needed. It should now be saved without errors.

    v46Zdqf.png



    4. [Optional] Check if the snapraid config folder was recreated:

    Code
    # ls -lh /etc/snapraid
    total 12K
    lrwxrwxrwx 1 root root   68 Mar 19 17:15 array1.conf -> /etc/snapraid/omv-snapraid-114a88d2-53ed-11ed-8eee-b3f2573b9c38.conf
    -rw-r--r-- 1 root root 4.1K Mar 19 17:15 omv-snapraid-114a88d2-53ed-11ed-8eee-b3f2573b9c38.conf
    • Offizieller Beitrag

    Glad it is working. Step 1 is not needed. The saltstack code ensures it exists before writing the config file(s).

    openmediavault-snapraid/srv/salt/omv/deploy/snapraid/default.sls 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.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

  • gabotron

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

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