package lvm2 2.03.07-1ubuntu1 failed to install/upgrade: installed lvm2 package post-installation script subprocess returned error exit status 1

Bug #1871176 reported by Hayden Barnes
56
This bug affects 13 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

hayden@t470s:~$ sudo apt-get install gnome-boxes
[sudo] password for hayden:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-boxes is already the newest version (3.36.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up lvm2 (2.03.07-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Failed to restart lvm2-lvmpolld.service: Unit lvm2-lvmpolld.socket is masked.
invoke-rc.d: initscript lvm2-lvmpolld, action "restart" failed.
● lvm2-lvmpolld.service - LVM2 poll daemon
     Loaded: loaded (/lib/systemd/system/lvm2-lvmpolld.service; static; vendor preset: enabled)
     Active: active (exited) since Mon 2020-04-06 09:33:50 EDT; 4h 10min ago
       Docs: man:lvmpolld(8)
      Tasks: 0 (limit: 23811)
     Memory: 0B
     CGroup: /system.slice/lvm2-lvmpolld.service

Apr 06 09:33:50 t470s systemd[1]: Starting LSB: LVM2 poll daemon...
Apr 06 09:33:50 t470s systemd[1]: Started LSB: LVM2 poll daemon.
dpkg: error processing package lvm2 (--configure):
 installed lvm2 package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.136ubuntu2) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-21-generic
Errors were encountered while processing:
 lvm2
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: lvm2 2.03.07-1ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-21.25-generic 5.4.27
Uname: Linux 5.4.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu24
Architecture: amd64
Date: Mon Apr 6 13:38:10 2020
ErrorMessage: installed lvm2 package post-installation script subprocess returned error exit status 1
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.1
SourcePackage: lvm2
Title: package lvm2 2.03.07-1ubuntu1 failed to install/upgrade: installed lvm2 package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Hayden Barnes (haydenb) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lvm2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeffery To (jefferyto) wrote :

I got this error after a few steps:

* After upgrading from eoan to focal and rebooting, I was dropped into the initramfs shell. Exiting from the shell, I see the error message "/dev/mapper/ubuntu--vg-root does not exist".

* After some searching online, I reboot using my previous kernel and reach the desktop.

* I open Synaptic and see that lvm2 was removed. When I try to install it, I get the error in this issue.

After some more searching online, I see https://askubuntu.com/questions/1049727/every-time-i-install-or-remove-a-package-i-get-lvm2-error/1085420 and try the suggested answer (purge lvm2 before reinstalling) - this worked.

Revision history for this message
Brett Holman (holmanb) wrote :

Also experienced on an lxd vm when lvm2 is uninstalled and subsequently reinstalled.

root@cloudinit-0721-232304wnvzml11:~# apt install lvm2
Reading package lists... Done
Building dependency tree
Reading state information... Done
lvm2 is already the newest version (2.03.07-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up lvm2 (2.03.07-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Failed to restart lvm2-lvmpolld.service: Unit lvm2-lvmpolld.socket is masked.
invoke-rc.d: initscript lvm2-lvmpolld, action "restart" failed.
● lvm2-lvmpolld.service - LVM2 poll daemon
     Loaded: loaded (/lib/systemd/system/lvm2-lvmpolld.service; static; vendor p
reset: enabled)
     Active: inactive (dead)
       Docs: man:lvmpolld(8)
dpkg: error processing package lvm2 (--configure):
 installed lvm2 package post-installation script subprocess returned error exit
status 1
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-1071-kvm
W: mkconf: MD subsystem is not loaded, thus I cannot scan for arrays.
W: mdadm: failed to auto-generate temporary mdadm.conf file.
Errors were encountered while processing:
 lvm2
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@cloudinit-0721-232304wnvzml11:~# echo $?
100

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.