UCS problem, cannot update packages

Hi All,
I have an UCS server which is being a member server role, acting a file server. The current version is 4.1-4 errata443. I updated all UCS server in the system to the latest version 4.1-4 errata445. But this file server is having problem as below:

  1. Upgrade package failed via GUI

  2. Check system diagnostics

  3. Execute commands as the suggestion of system

  4. I tried to execute some commands like:
    dpkg --configure lvm2
    apt-get install -f
    dpkg --configure -a
    apt-get autoremove
    apt-get autoclean
    but the system cannot fix the issue automatically.

I do not want to try more advance commands because I’m afraid of failure of system. Please help me to solve this issue a.s.a.p. Thank you

Hi @nasexp,

have you tried to reinstall the package?
Does the output from dpkg --audit or univention-install -yfm --force-yes --fix-missing help to solve that issue?

@stoeckigt: Hi Nico, try to reinstall is not helpful
The same error as above screenshot:

Reading package lists…
Building dependency tree…
Reading state information…
0 upgraded, 0 newly installed, 0 to remove and 549 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up lvm2 (2.02.168-2+b1) …
[…] Setting up LVM Volume Groups… WARNING: Failed to connect to lvmetad. Falling back to device scanning.
done.
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match lvm2 Default-Start values (S)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match lvm2 Default-Stop values (none)
/etc/init.d/lvm2-lvmetad: 4: .: Can’t open /lib/init/init-d-script
invoke-rc.d: initscript lvm2-lvmetad, action “restart” failed.
dpkg: error processing lvm2 (–configure):
subprocess installed post-installation script returned error exit status 2
Processing triggers for initramfs-tools …
update-initramfs: Generating /boot/initrd.img-4.1.0-ucs227-amd64
Errors were encountered while processing:
lvm2
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@files:~#

Is there any suggestion can help me to solve this issue?

Hi @nasexp,

sorry, I lost a bit of track on your request.

Probably you might fix this issue by trying something unexpected… but first please let us know if the respective file ‘/etc/init.d/lvm2-lvmetad’ or other files in this context exist:

ls -lah /etc/init.d/lvm*

Move the decryed files away and continue the setup

tar -czvf ~/lvm2_etad-init_script.tgz /etc/init.d/lvm2-lvmetad --remove-files
univention-install -f

Maybe it’s of some use to know a little bit more about your partition geometry / LVM:

pvscan
lvs
lvscan
vgscan
vgs

kind regards

Hi Nico,
I will try your suggestion at night. It’s working hour now and everyone is using a lot of resources on file server now. I’ll let you know the result later. Tks a lot :slight_smile:

You might already post the command outputs in advance.

@stoeckigt: Hi Nico, appreciate for your help so much. I follow your instruction and the system updated successfully now. Below is the output:

root@files:~# ls -lah /etc/init.d/lvm*
-rwxr-xr-x 1 root root 695 Mar 17 23:03 /etc/init.d/lvm2
-rwxr-xr-x 1 root root 571 Mar 17 23:03 /etc/init.d/lvm2-lvmetad
-rwxr-xr-x 1 root root 586 Mar 17 23:03 /etc/init.d/lvm2-lvmpolld

root@files:~# tar -czvf ~/lvm2_etad-init_script_new.tgz /etc/init.d/lvm* --remove-files
tar: Removing leading `/' from member names
/etc/init.d/lvm2
/etc/init.d/lvm2-lvmpolld
root@files:~# univention-install -f
Hit https://updates.software-univention.de 4.0-1/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.0-2/all/ Release.gpg
Hit https://updates.software-univention.de 4.0-2/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.0-3/all/ Release.gpg
Hit https://updates.software-univention.de 4.0-3/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.0-4/all/ Release.gpg
Hit https://updates.software-univention.de 4.0-4/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.0-5/all/ Release.gpg
Hit https://updates.software-univention.de 4.0-5/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.1-0/all/ Release.gpg
Hit https://updates.software-univention.de 4.1-0/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.1-1/all/ Release.gpg
Hit https://updates.software-univention.de 4.1-1/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.1-2/all/ Release.gpg
Hit https://updates.software-univention.de 4.1-2/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.1-3/all/ Release.gpg
Hit https://updates.software-univention.de 4.1-3/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.1-4/all/ Release.gpg
Hit https://updates.software-univention.de 4.1-4/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.1-4-errata/all/ Release.gpg
Hit https://updates.software-univention.de 4.1-4-errata/amd64/ Release.gpg
Hit https://updates.software-univention.de 4.0-0/all/ Release
Hit https://updates.software-univention.de 4.0-0/amd64/ Release
Hit https://updates.software-univention.de 4.0-1/all/ Release
Hit https://updates.software-univention.de 4.0-1/amd64/ Release
Hit https://updates.software-univention.de 4.0-2/all/ Release
Hit https://updates.software-univention.de 4.0-2/amd64/ Release
Hit https://updates.software-univention.de 4.0-3/all/ Release
Hit https://updates.software-univention.de 4.0-3/amd64/ Release
Hit https://updates.software-univention.de 4.0-4/all/ Release
Hit https://updates.software-univention.de 4.0-4/amd64/ Release
Hit https://updates.software-univention.de 4.0-5/all/ Release
Hit https://updates.software-univention.de 4.0-5/amd64/ Release
Hit https://updates.software-univention.de 4.1-0/all/ Release
Hit https://updates.software-univention.de 4.1-0/amd64/ Release
Hit https://updates.software-univention.de 4.1-1/all/ Release
Hit https://updates.software-univention.de 4.1-1/amd64/ Release
Hit https://updates.software-univention.de 4.1-2/all/ Release
Hit https://updates.software-univention.de 4.1-2/amd64/ Release
Hit https://updates.software-univention.de 4.1-3/all/ Release
Hit https://updates.software-univention.de 4.1-3/amd64/ Release
Hit https://updates.software-univention.de 4.1-4/all/ Release
Hit https://updates.software-univention.de 4.1-4/amd64/ Release
Hit https://updates.software-univention.de 4.1-4-errata/all/ Release
Hit https://updates.software-univention.de 4.1-4-errata/amd64/ Release
Hit https://updates.software-univention.de 4.0-0/all/ Packages
Hit https://updates.software-univention.de 4.0-0/amd64/ Packages
Hit https://updates.software-univention.de 4.0-1/all/ Packages
Hit https://updates.software-univention.de 4.0-1/amd64/ Packages
Hit https://updates.software-univention.de 4.0-2/all/ Packages
Hit https://updates.software-univention.de 4.0-2/amd64/ Packages
Hit https://updates.software-univention.de 4.0-3/all/ Packages
Hit https://updates.software-univention.de 4.0-3/amd64/ Packages
Hit https://updates.software-univention.de 4.0-4/all/ Packages
Hit https://updates.software-univention.de 4.0-4/amd64/ Packages
Hit https://updates.software-univention.de 4.0-5/all/ Packages
Hit https://updates.software-univention.de 4.0-5/amd64/ Packages
Hit https://updates.software-univention.de 4.1-0/all/ Packages
Hit https://updates.software-univention.de 4.1-0/amd64/ Packages
Hit https://updates.software-univention.de 4.1-1/all/ Packages
Hit https://updates.software-univention.de 4.1-1/amd64/ Packages
Hit https://updates.software-univention.de 4.1-2/all/ Packages
Hit https://updates.software-univention.de 4.1-2/amd64/ Packages
Hit https://updates.software-univention.de 4.1-3/all/ Packages
Hit https://updates.software-univention.de 4.1-3/amd64/ Packages
Hit https://updates.software-univention.de 4.1-4/all/ Packages
Hit https://updates.software-univention.de 4.1-4/amd64/ Packages
Hit https://updates.software-univention.de 4.1-4-errata/all/ Packages
Hit https://updates.software-univention.de 4.1-4-errata/amd64/ Packages
Fetched 819 B in 23s (35 B/s)
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 585 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up lvm2 (2.02.168-2+b1) ...
invoke-rc.d: unknown initscript, /etc/init.d/lvm2 not found.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-4.1.0-ucs227-amd64
root@files:~#

Then I executed command “apt-get autoremove” and “apt-get autoclean” and try to update again via GUI. Finally, it was successful :heart_eyes:

Hey,

This seems to be the root cause of everything else. Please verify that the file exists. Post the output of of ls -l /lib/init/init-d-script.

If it doesn’t exist, you’ll have to re-install the package it belongs to, which is sysvinit-utils. Try apt install sysvinit-utils. If that doesn’t work due to lvm2 not being configured yet, then you can try downloading and installing it manually. In that case execute the following commands and paste their output here:

wget https://updates.software-univention.de/4.0/maintained/4.0-0/amd64/sysvinit-utils_2.88dsf-41.43.201408220944_amd64.deb
dpkg -i sysvinit-utils_2.88dsf-41.43.201408220944_amd64.deb
dpkg --configure lvm2

EDIT: Oops, you’re still running 4.1, not 4.2. I’ve corrected the download link (the original post was for downloading the package for 4.2).

Kind regards,
mosu

Hi @Moritz_Bunkus
Maybe you are correct, but I solved this issue as the instruction from @stoeckigt :slight_smile: Thank you so much for your reply.

@Moritz_Bunkus: The reason why I’ve not upgraded to 4.2 because there are a lot of topics which the failure of the upgrading progress was mentioned. Our current system (4.1) is running for production environment so I’m so scared of any issues like somebody met. I would wait till there is a tool/script to check if the upgrade progress will have any errors or not :smiley:

Mastodon