SnapRAID 7.0.7 - Wiping Drive Config on Upgrade

  • Just upgraded to plugin 7.0.7 and the SnapRAID -> Arrays, Drives, and Rules pages all return a 500 - Invalid RPC Response error on load.


    I did notice an error while it was upgrading, from what I can remember it read something along the lines of ""paritynum" is not an object".


    I did have the issue when upgrading from OMV 6->7 with the incorrect parity number but I fixed that manually a while ago, not sure if that could be causing this?


    Syslog error:


    Code
    2024-04-12T15:53:43.648978-06:00 nas omv-engined[2629466]: PHP Fatal error: Uncaught TypeError: OMV\Config\ConfigObject::setAssoc(): Argument #1 ($data) must be of type array, string given, called in /usr/share/php/openmediavault/config/database.inc on line 98 and defined in /usr/share/php/openmediavault/config/configobject.inc:248
    2024-04-12T15:53:43.649362-06:00 nas omv-engined[2629466]: Stack trace:
    2024-04-12T15:53:43.649466-06:00 nas omv-engined[2629466]: #0 /usr/share/php/openmediavault/config/database.inc(98): OMV\Config\ConfigObject->setAssoc()
    2024-04-12T15:53:43.649540-06:00 nas omv-engined[2629466]: #1 /usr/share/openmediavault/engined/rpc/snapraid.inc(218): OMV\Config\Database->get()
    2024-04-12T15:53:43.649606-06:00 nas omv-engined[2629466]: #2 [internal function]: OMVRpcServiceSnapRaid->getDriveList()
    2024-04-12T15:53:43.649670-06:00 nas omv-engined[2629466]: #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()
    2024-04-12T15:53:43.649741-06:00 nas omv-engined[2629466]: #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
    2024-04-12T15:53:43.649802-06:00 nas omv-engined[2629466]: #5 /usr/sbin/omv-engined(535): OMV\Rpc\Rpc::call()
    2024-04-12T15:53:43.649862-06:00 nas omv-engined[2629466]: #6 {main}
    2024-04-12T15:53:43.649928-06:00 nas omv-engined[2629466]:   thrown in /usr/share/php/openmediavault/config/configobject.inc on line 248

    EDIT: config.xml

    I suspect the issue is from the <drive>paritynum</drive> lines...where I expect is where my data drives should be? This was all working fine pre-upgrade.


    EDIT 2: What config.xml looked like prior to upgrade (taken from fsa backup performed last night):


    I'm assuming restoring those drive configs would fix the issue but want to make the maintainer aware this is happening, without a backup I suspect those drive configs may be lost for others who upgrade and have this issue?

  • asandhu

    Hat den Titel des Themas von „SnapRAID 7.0.7 - 500 Error RPC Response“ zu „SnapRAID 7.0.7 - Wiping Drive Config on Upgrade“ geändert.
  • I witnessed the same issue. Here is the output from omv-upgrade.


  • It appears that the work performed here has caused an issue with the single parity configuration during parameter validation.


    I've discovered a workaround to resolve this:

    • Create a new 'raid'.
    • On each disk, set parity to 2, even if initially configured as data/content. It is safe since it is ignored
    • Save your changes.
    • Then, revert the setting on the parity disk (only) to 1
    • Save your changes again.


    Snapraid should be functional again


    I didn't try on an existing 'raid', let us know if it works for you

    • Offizieller Beitrag

    Sorry about the bug. It is fixed now and 7.0.8 is in the repo.

    fix typo · OpenMediaVault-Plugin-Developers/openmediavault-snapraid@af2891c
    Signed-off-by: Aaron Murray <plugins@omv-extras.org>
    github.com

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    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!

    • Offizieller Beitrag

    what is there to be done?

    If you don't remember how it is setup, save off the config file /etc/snapraid/ and uninstall the plugin. Then reinstall the plugin and recreate the array.

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    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!

    • Offizieller Beitrag

    Hmmm, if we don't have a backup of the old config, what is there to be done?

    I upgraded to v0.8

    In your case you have the previous database configuration. So, you can do the following:

    - Backup of the current database. File /etc/openmediavault/config.xml

    - Replace the Snapraid part with what you had before, what you published in post No. 1

    - Run omv-salt deploy run snapraid

    If ryecoaaron has not changed the database format in version 7.08 the plugin should work. If you do not have a system backup, it is better to wait for ryecoaaron to confirm this procedure.

    • Offizieller Beitrag

    If ryecoaaron has not changed the database format in version 7.08 the plugin should work. I

    I did not change the database format. The bug came from trying to fix bad upgrades from OMV 6. I mention how to fix in post #7

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    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!

    • Offizieller Beitrag

    Ah I see the old config. That could be placed back in the omv database like Chente mentioned.

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    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!

  • In your case you have the previous database configuration. So, you can do the following:

    - Backup of the current database. File /etc/openmediavault/config.xml

    - Replace the Snapraid part with what you had before, what you published in post No. 1

    - Run omv-salt deploy run snapraid

    If ryecoaaron has not changed the database format in version 7.08 the plugin should work. If you do not have a system backup, it is better to wait for ryecoaaron to confirm this procedure.

    I think you missquote me, since I don't have access to the old config. This would apply for OP.

    Now I read the post 7, so will let you know how it goes :)


    PS:

    I did have a backup actually of the said config, but I read that it's more or less useless and cannot restore an install, so I went ahead and cloned the usb with rufus. So in the worse case scenario, I will power down and swap omv usbs :)

    • Offizieller Beitrag

    I think you missquote me, since I don't have access to the old config. This would apply for OP.

    You're right, I thought you were asandhu sorry. :thumbup:

    • Offizieller Beitrag

    I did have a backup actually of the said config, but I read that it's more or less useless and cannot restore an install

    If you have a backup in which you can access the previous database (file /etc/openmediavault/config.xml) you can also apply that procedure.

    • Offizieller Beitrag

    Yep, all you need is the snapraid section of the config file in your backup.

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    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!

  • Backup'd the snap configs. Uninstalled the snapraid and reinstalled


    Getting an error when trying to recreate the drives (exact as before):




    I think I better swap the omv usb clone installs. It's less than a month old I think. Unless there's other suggestions.

    Thanks

  • Swapped omv usbs. Updated all packages in the old one, snapraid updated to 7.0.8 all working as expected.


    Now I will swap back, and replace the config.xml with the working one and

    omv-salt deploy run snapraid

    Should be good to go, preserving the working usb as a backup as before.

    Will post result.


    LE: all working great now, no issues.

    Thanks for your support and I heart OMV!

    • Offizieller Beitrag

    reinstalled the plugin and it's showing error paritynum: The value "1" is not an integer. when I'm trying to add disk to the array

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    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!

Jetzt mitmachen!

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