Upgrade Scripts for non-interactive major release upgrades (2->3, 3->4, 4->5)

  • mhmm, ok. I'v installed all missing packages. But still geting this issue when trying to upgrade openmediavault+


    Ok. salt-minion seems to be the culprit now. The version to be installed is the one from Debian, not the one from omv. So what do these commands say:


    sudo apt-cache policy salt-minion

    sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion

    sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1

  • sudo apt-cache policy salt-minion

    sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion

    sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1

    that's the output from all 3 commands:

  • Alen, I just noticed that #33 doesn't show the full resolver log, only the last lines.

    hopefully this is the full resolver log - seems like salt-minion is again the issue?

  • that's the output from all 3 commands:

    Yes, that should be


    sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1 salt-common=3002.2+ds-1


    then to succeed. However the interesting part is that on my system the packages from packages.openmediavault.org have a higher priority (995) then the ones from Debian (990). While on your system for salt* it shows the the standard priority of 500. Compare it to my test system:



    It seems that /etc/apt/preferences.d/openmediavault.pref on my test system is a remnant of an earlier openmediavault version and sets the priority high enough so it works. You didn't list this file though when I asked for the contents of /etc/apt/preferences.d/. But in one of your earlier replies the output of sudo apt-cache policy was:

    Quote

    995 https://openmediavault.github.io/packages arrakis/main amd64 Packages

    release o=openmediavault.org archive,a=arrakis,n=arrakis,l=openmediavault.org archive,c=main,b=amd64
    origin openmediavault.github.io

    995 http://packages.openmediavault.org/public arrakis/main amd64 Packages
    release o=openmediavault.org archive,a=arrakis,n=arrakis,l=openmediavault.org archive,c=main,b=amd64
    origin packages.openmediavault.org

    So there must be some pinning somewhere. Would you be so kind to post the contents of the files found in /etc/apt/preferences.d/?


    I think that's all I need to reproduce the issue now.

  • Ok thank you Dleidert - after i removed the backports I followed through and it seemed to go swimmingly. Rebooted and all rebooted ok...


    Now on 4.1.36.1..... Now to upgrade to V5x!!!


    Thank you for the ease and relative painfree upgrade - really appreciated!! :)

    Just wanted to follow up... I managed to upgrade from 3-4 with your help, and then followed your guide from 4-5 and all installed.. i think!!


    Seems like whilst i can still get in using SSH, I cannot get in using the Web Control panel. I have gone in with firstaid and changed it... however it still refuses. Not sure if anything changed at all between 4 and 5 that i missed?

  • toibs because there might be an issue that omv4 is not upgraded please check what the following says:


    sudo apt-cache policy openmediavault


    And as always I'd appreciate the log file.

    root@openmediavault:/# sudo apt-cache policy openmediavault

    openmediavault:

    Installed: 4.1.36-1

    Candidate: 5.5.21-1

    Version table:

    5.5.21-1 500

    500 http://packages.openmediavault.org/public usul/main amd64 Packages

    *** 4.1.36-1 100

    100 /var/lib/dpkg/status


    if i try to run the upgrade script again i get....


    sudo ./omv-release-upgrade-5

    2021-01-07T08:02:34,131750108+00:00

    run-parts: executing /openmediavault-upgrade-4.3/check.d/01-debian-version

    You are trying to run this script from Debian '10.7', not Debian 'stretch'.

    run-parts: /openmediavault-upgrade-4.3/check.d/01-debian-version exited with return code 1

  • You ran into the same issue as Alen did.


    Parts of your system have already been upgraded. OMV has not yet been upgraded. We are going to fix it by hand. Get the latest source


    Code
    wget -qO- https://github.com/dleidert/openmediavault-upgrade/archive/v4.4.tar.gz | tar -xz
    cd openmediavault-upgrade-4.4


    and instead of running the whole script, run the remaining scripts manually.:


    Code
    . inc/envvars
    sudo pre.d/01-create-omvvars
    sudo pre.d/72-apt-update-omv-source-list
    sudo pre.d/73-apt-source-remove-docker
    sudo pre.d/75-apt-source-armbian-fix
    sudo run.d/10-apt-update
    sudo run.d/80-apt-dist-upgrade
    sudo run.d/81-apt-dist-upgrade-omv


    Now after having done this sudo apt-cache policy openmediavault should show the 5.x version installed. Then run the remaining tasks:


    Code
    sudo run-parts -v --exit-on-error post.d


    Now everything should be fine.

    Edited 3 times, last by dleidert: add missing steps to create inc/omvvars and fix omv sources ().

  • Thank you dleidert...


    However doesnt seem to work :(


    Code
    . inc/envvars
    sudo run.d/80-apt-dist-upgrade
    sudo run.d/81-apt-dist-upgrade-omv


    sudo run.d/80-apt-dist-upgrade - this comes up clear (all up to date)

    However sudo run.d/81-apt-dist-upgrade-omv brings up the following :

    Code
    root@openmediavault:/openmediavault-upgrade-4.4# sudo run.d/81-apt-dist-upgrade-omv
    run.d/81-apt-dist-upgrade-omv: 6: .: Can't open /openmediavault-upgrade-4.4/run.d/../inc/omvvars


    Sorry :(

  • Hi,

    thanks for the great Script :)

    Now i will also try to Update my OMV4 to OMV5.


    Just to be sure, because was often running into problems on Upgrades:

    - I need to delete the Extra Repo

    - Also i need to uninstall all Plugins?

    - Still using Plex as "Plugin" because had bad experince with Plex as a Docker and i don't really want to move my Plex into a Docker. Is it possible to keep Plex installed during the Update process?


    Backup:

    Did a Backup via the Backup Plugin (fsarchiver), so all should be save, if i run into problems and i can restore the complete OMV installation as it was at the time of the Backup?


    Sorry for this Questions, but i was reading the half day during the Forum and wasn't 100% sure about this topics. Don't want to crash my great running OMV installation *scarry*

  • sudo run.d/80-apt-dist-upgrade - this comes up clear (all up to date)

    However sudo run.d/81-apt-dist-upgrade-omv brings up the following :

    Code
    root@openmediavault:/openmediavault-upgrade-4.4# sudo run.d/81-apt-dist-upgrade-omv
    run.d/81-apt-dist-upgrade-omv: 6: .: Can't open /openmediavault-upgrade-4.4/run.d/../inc/omvvars


    Sorry :(

    Yes. Run


    sudo pre.d/01-create-omvvars


    first. It will create the missing file inc/omvvars.

  • The scripts currently deal with omvextras installed. And they will remove all plugins not available for OMV5.


    Is plex from one of the repositories omvextras adds to its menu? Then you should be fine. Do you have any third-party software installed, either not being installed in Debian package format or pulled in from any non-omv resource (not counting the resources omvextras enables)? And the scripts are untested for Raspbian users.


    It is good you have a backup. Then you should be able to replay it to the system. To restore the system's filesystem one has to use a live-cd or extra system though. There was a thread recently how to play such a backup back. However I haven't seen a non-salvageable system in my time.


    I understand the feelings. I can test it in a VM if you want. You need to provide me the package list


    dpkg-query -W -f='${binary:Package}=${Version}\n' | sort > package.list


    and which repositories from omvextras you have enabled and if you have the backports repository enabled.

  • sudo apt-cache policy openmediavaul


    Alen the issue has been fixed in release 4.4 of the script. You should now be able to upgrade.

    dleidert you are star!!! I've restored the snapshot on my VM to pre-upgrade and ran the release 4.4 script and all went fine. My test system has been upgrade to v 5.5.21-1. Will do some testing now.


    Do you still need to content of /etc/apt/preferences.d/ for further analysis?


    vcdwelt I also had Plex/Duplicati/Rsync installed pre-upgrade - there are all gone now. Also Dockers is gone with all my dockers installed. This is more of a problem. Is this expected behaviour?

    Edited once, last by Alen: added extra information about Docker ().

  • I also had Plex/Duplicati/Rsync installed pre-upgrade - there are all gone now. Also Dockers is gone with all my dockers installed. This is more of a problem. Is this expected behaviour?

    dleidert could you please comment on this finding?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • Do you still need to content of /etc/apt/preferences.d/ for further analysis?

    No, thanks.


    I also had Plex/Duplicati/Rsync installed pre-upgrade - there are all gone now. Also Dockers is gone with all my dockers installed. This is more of a problem. Is this expected behaviour?


    There is a list of plugins not available for omv5. These plugins get removed before attempting the upgrade. The plugin list includes openmediavault-docker-gui, openmediavault-duplicati, and openmediavault-shellinabox in your case. At the moment the script pre.d/50-remove-plugins removes these plugins as well es the packages they pulled in completely. It might not be ideal, but it is the cleanest solution at the moment. I can make a more "defensive" approach and just remove the plugin package, leaving the other packages untouched. That may lead to systems having a lot of cruft installed afterwards.


    I'm open for suggestions how it should work.

    • Official Post

    I'm open for suggestions how it should work.

    You could probably apt-mark manual plexmediaserver duplicati docker-ce


    As for the dockers, they aren't gone. just reinstall docker and they will come back. If they are gone, it is just the images. You data should still be stored in the volumes specified for each container. A slight pain but nothing is gone.

    omv 8.0.10-2 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.5 | compose 8.1.3 | cterm 8.0 | borgbackup 8.1.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.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!

  • I had thought about the same solution. I've added a script to mark a defined list of packages as manually installed. The list currently consists of the three packages you mention. If there are more it can be extended. Will be part of release 4.5.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!