Automatic conversion to merged /usr during upgrade OMV4 to 5

  • Hello all,


    I originally posted this in the General forum as part of another thread I made, but really it belongs here.


    I have been following this guide to upgrade from OMV4 to OMV5 and everything seemed to be going well until I entered this command using the CL via SSH:


    apt-get install usrmerge


    I then got this dialogue.


    ... followed by this one.


    So I am a bit stuck now and I'd like some advice on what to do next, please. I did visit the web GUI out of interest and it says its upgraded to OMV 5.5.19-1 Usul but has the big yellow banner at the top saying "The configuration has been changed. You must apply the changes in order for them to take effect." [Apply] [Revert]


    Thank you,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Nick0

    Hat das Label OMV 4.x hinzugefügt.
  • Nick0

    Hat das Label Upgrade 4.x -> 5.x hinzugefügt.
  • You should run these scripts and commands inside a screen session to be honest. So if the ssh connection breaks you can re-join the session.


    For some reason you lost the SSH connection during or after this merge (not sure why). So you might have packages left unconfigured. You might want to make sure that you don't have any package installations pending after re-establishing the SSH connection:


    sudo apt-get install -f



    One can also run the usrmerge installation command with the dialog disabled:


    sudo DEBIAN_FRONTEND=noninteractive apt-get install usrmerge


    But again these things should be done in a screen session.

  • Hi dleidert and thanks for your message.


    So, is a screen session just a different (safer) type of terminal window? I usually just SSH using terminal on my mac and the reason I think the connection broke was that I left the window open overnight and partway through the next day with no input, this was because I was waiting for an answer in order to continue, as the first person to answer me had never seen the dialogue (this can be seen from the previous thread I mentioned, where the dialogues are linked to).


    Also, the connection wasn't lost during or after the merge as i hadn't agree to the dialogue. My real problem is what do i say at the dialogue, can I agree to it or not?


    I basically use OMV to keep my media on and as a backup for important documents, I have a second server that hosts a copy of the first, just for extra safe keeping.


    Thanks,

    Nick.


    EDIT: OK, so I ahve read a bit about screen and I see that I already have it with terminal on the mac, just need to type 'screen' (return) to use it in a normal terminal window. Thanks for the tip!

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    2 Mal editiert, zuletzt von Nick0 ()

  • Yes, screen creates a (virtual) terminal/console session. If the SSH connection breaks the terminal session usually closes with it. Using screen the console session survives and you can rejoin the session. So this is much safer then just using the terminal after logging in via SSH. Just think about the consequences when your SSH connection breaks while an apt-get dist-upgrade is still running.


    Regarding the usrmerge package: The whole purpose of this package is to do the transition of the system to a merged /usr directory. When it finishes the package looses its purpose and can be removed. So if you don't want to do the transition (same as answering No) then don't install the package. Otherwise say "Yes". You probably have to do the transition at some point anyway.

  • Many thanks for your continued help here.


    OK, so if i will need to eventually merge the /usr directory then I may as well do that now. Using the guide that I did previously, can I just load up screen and carry on by entering the apt-get install usrmerge command since I have already completed the previous steps:


    wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/upgrade4to5 | sudo bash


    Reboot


    apt-get purge openmediavault-omvextrasorg resolvconf

    wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash

    apt-get update

    apt-get dist-upgrade

    omv-salt deploy run nginx

    omv-salt deploy run phpfpm


    ... so that would just leave:


    apt-get install usrmerge

    omv-confdbadm migrate conf 5.0.0


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Thanks again, I get this though:


    FATAL ERROR:

    Both /bin/upssched-cmd and /usr/bin/upssched-cmd exist.


    You can try correcting the errors reported and running again

    /usr/lib/convert-usrmerge until it will complete without errors.

    Do not install or update other Debian packages until the program

    has been run successfully.


    dpkg: error processing package usrmerge (--configure):

    installed usrmerge package post-installation script subprocess returned error exit status 1

    Errors were encountered while processing:

    usrmerge

    E: Sub-process /usr/bin/dpkg returned an error code (1)


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • No problem, here's what I have:


    root@openmediavault:~# ls -lA / | grep -ie "s\\?bin\|lib"

    drwxr-xr-x 2 root root 4096 Dec 26 02:17 bin

    drwxr-xr-x 16 root root 4096 Dec 24 00:30 lib

    drwxr-xr-x 2 root root 4096 Dec 23 23:56 lib64

    drwxr-xr-x 2 root root 12288 Dec 24 00:30 sbin


    Happy Christmas, by the way.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • Can you check the hashsums of the conflicting files:


    Code
    ls -lA /bin/upssched-cmd /usr/bin/upssched-cmd
    md5sum /bin/upssched-cmd /usr/bin/upssched-cmd


    Also it would be interesting if there are more duplicates. Maybe you can have a look into /bin and /usr/bin and check if you find more duplicate files?

  • Okay, here's what I get for the hashsums:


    root@openmediavault:~# ls -lA /bin/upssched-cmd /usr/bin/upssched-cmd

    -rwxr-xr-x 1 root root 523 Jun 1 2018 /bin/upssched-cmd

    -rwxr-xr-x 1 root root 3003 Apr 24 2019 /usr/bin/upssched-cmd

    root@openmediavault:~# md5sum /bin/upssched-cmd /usr/bin/upssched-cmd

    62ef631676045929f6834659a6233ee1 /bin/upssched-cmd

    6bad244dec5718cd9b6e1723eda024dd /usr/bin/upssched-cmd


    ... and then I have used my very limited CL knowledge to look inside the /bin and /usr/bin directories to look for duplicates, starting with /bin:


    root@openmediavault:~# cd /bin

    root@openmediavault:/bin# ls


    echo ntfsinfo umount

    egrep ntfsls uname

    false ntfsmove uncompress

    fgconsole ntfsrecover unicode_start

    fgrep ntfssecaudit upsc

    findmnt ntfstruncate upscmd

    fsck.btrfs ntfsusermap upslog

    fuser ntfswipe upsrw

    fusermount openvt upssched-cmd

    getfacl pidof vdir

    grep ping wdctl

    gunzip ping4 which

    gzexe ping6 ypdomainname

    gzip ps zcat

    hostname pwd zcmp

    ip rbash zdiff

    journalctl readlink zegrep

    kbd_mode rm zfgrep

    keyctl rmdir zforce

    kill rnano zgrep

    kmod run-parts zless

    ln sed zmore

    loadkeys setfacl znew


    ... and then looking in /usr/bin


    root@openmediavault:/bin# cd /usr/bin

    root@openmediavault:/usr/bin# ls


    mcview vi

    md5sum view

    md5sum.textutils vim.tiny

    mesg vmstat

    migrate-pubring-from-classic-gpg w

    mk_modmap w.procps

    mkfifo wall

    monit watch

    msql2mysql watchgnupg

    mv wc

    mvxattr wget

    my_print_defaults whereis

    myisam_ftdump which

    myisamchk whiptail

    myisamlog who

    myisampack whoami

    mysql wpa_passphrase

    mysql_convert_table_format write

    mysql_embedded wsrep_sst_common

    mysql_find_rows wsrep_sst_mariabackup

    mysql_fix_extensions wsrep_sst_mysqldump

    mysql_install_db wsrep_sst_rsync

    mysql_plugin wsrep_sst_rsync_wan

    mysql_secure_installation x86_64

    mysql_setpermission xargs

    mysql_tzinfo_to_sql xmlstarlet

    mysql_upgrade xsubpp

    mysql_waitpid xxd

    mysqlaccess yes

    mysqladmin zcat

    mysqlanalyze zdump

    mysqlbinlog zfgrep

    mysqlcheck zgrep

    mysqld_multi zipdetails

    mysqld_safe zless

    mysqld_safe_helper znew

    mysqldump


    I don't see any duplicates. Hopefully, I have done this right and this is what you are looking for.


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    Einmal editiert, zuletzt von Nick0 ()

  • There are actually more duplicates, e.g. zless, znew.


    /bin/upssched-cmd actually has the right file size. So the question was: where is /usr/bin/upssched-cmd coming from. And the answer is: openmediavault-nut. So you'll have to remove (deinstall) this plugin and try to finish the usrmerge transition again. You can probably reinstall it afterwards. But only install plugins you really use.

  • Ah, sorry - I misunderstood, I thought I was supposed to be looking for duplicates within directories, not across the two. This was a bit stupid of me because obviously two filenames that are exactly the same are not going to be exisitng in the same directory!


    OK, so I see the duplicates now, I don't know how you have related this to openmediavault-nut but after a little reasearch, I see that its to do with UPS. This must be a core plugin since I don't remember ever installing it myself.


    Anyway, I'll go with apt-get --purge remove openmediavault-nut


    ... then:


    apt-get install usrmerge


    ... and we will see!


    Thanks again,

    Nick.


    EDIT:


    To update you, I removed the plugin and then it seemed to run apt-get install usrmerge without me asking it to, so I ran:


    omv-confdbadm migrate conf 5.0.0 and got this summary:


    Summary for openmediavault.local

    -------------

    Succeeded: 16 (changed=2)

    Failed: 0

    -------------

    Total states run: 16

    Total run time: 10.020 s

    Cleaning up configuration database ...

    Processing triggers for rsyslog (8.1901.0-1) ...

    Processing triggers for openmediavault (5.5.19-1) ...

    Updating file permissions ...

    Purging internal cache ...

    root@openmediavault:~# omv-confdbadm migrate conf 5.0.0

    Running migration conf_5.0.0

    WARNING: The node 'optiongroup' already exists at XPath '/config/services/rsync/jobs/job'.

    WARNING: The node 'optionowner' already exists at XPath '/config/services/rsync/jobs/job'.

    WARNING: The node 'timemachine' already exists at XPath '/config/services/smb/shares/share'.

    Running migration conf_5.0.3

    Running migration conf_5.2.0

    Running migration conf_5.5.0

    Running migration conf_5.5.3

    WARNING: The node 'clients' already exists at XPath '/config/system/time/ntp'.


    On loading the web GUI, it all looks okay but I still have the yellow banner: "The configuration has been changed. You must apply the changes in order for them to take effect." [Apply] [Revert] Do I apply?

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    2 Mal editiert, zuletzt von Nick0 ()

  • OK, so I see the duplicates now, I don't know how you have related this to openmediavault-nut but after a little reasearch, I see that its to do with UPS. This must be a core plugin since I don't remember ever installing it myself.

    Very easy. You can check to which installed package the file belongs via dpkg -S /usr/bin/upssched-cmd. And I checked it by getting the .deb file and looking at its contents via dpkg-deb -c. So if there are more duplicates you probably want to check to which installed packages they belong.

  • Thanks, I'll look into that. Do you think that its safe for me to hit [Apply] on the yellow banner now?


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

  • On loading the web GUI, it all looks okay but I still have the yellow banner: "The configuration has been changed. You must apply the changes in order for them to take effect." [Apply] [Revert] Do I apply?

    Make a backup of /etc/openmediavault/ and then apply. You have a backup.


    Edit: Or better make a backp of /etc to be really sure.

  • OK, well I actually ran a headless backup a few weeks ago on the old version 4 install so I think I am just going to go ahead and hit apply.


    EDIT: Okay, so I got an "An Error Has Occurred" warning so i think that I have used up enough of your time and kindness so I will see if I can restore from the backup and run the whole thing again from fresh.


    Thanks for all of your help and I will update you later on.


    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    Einmal editiert, zuletzt von Nick0 ()

  • Hi dleidert,


    Thanks, yes, I had already done that but I did it again for good measure, but still no joy. The headless backup was actually from June, but nothing in the setup has changed since then so I went with it and restored it, which is really good as I have never done it before. So relieved that I bothered to learn how to back it up with some help from the forum, of course!


    So, I will try the upgrade again now, is there anything I should do first?


    EDIT: I'm just going to try it!


    Thanks,

    Nick.

    I ride bikes a long way.
    longbikejourney.com


    omv 6.9.2-1 (Shaitan) | 64 bit | Linux 6.1.0-0.deb11.11-amd64 | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz | Dell PowerEdge R210 8GB RAM

    Einmal editiert, zuletzt von Nick0 ()

  • Remember to uninstall openmediavault-nut before attempting to install usrmerge. I would actually uninstall all unused plugins before attenpting the upgrade script. openmediavault-keyring is not a plugin but the repository key and has to be installed.


    JFTR: It would have been a good idea to examine the error by the OMV GUI. Also install screen and run the scripts inside screen so you can always rejoin the session if yomething goes wrong.


    Good luck.

Jetzt mitmachen!

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