After the update from Kubuntu 17.04 to 18.04 and a reboot, my system refused to boot and only gave me “emergency mode”. Long story short: for an unknown reason I had an empty volume “pvmove0” that the new version did not like, and after removing it it worked.
What was in the journal?
I had a look at the system journal with this command (the LANG is to have all messages in English, which is easier to find on the net than French):
LANG="en_GB.UTF-8" journalctl -xb
I had lines like that:
May 04 20:46:05 mymachine lvm: LV pvmove0: has no segment.
May 04 20:46:05 mymachine lvm: Couldn't read all logical volumes for volume group fablvm.
Also, most of the LVM commands could not read the Physical Volume (PV) and the Logical Volumes (LV) on this disk: they told me that the physical volumes did not belong to a Volume Group and they had no size.
The mysterious Logical Volume pvmove0
As Kubuntu 17.10 (on an USB stick) could still read all my PV and LV, I had the idea to backup the Volume Group metadata in Kubuntu 17.10 and restore it from Kubuntu 18.04.
vgcfgbackup -f path/to/my/backup.vg my_vg
Then I looked at the backup file and (holy cow!) I saw that I had an empty Logical Volume called “pvmove0“.
id = "Jp8y0E-RYIU-g4s0-PdUs-LEdo-N110-MLBwmQ"
status = ["READ", "WRITE", "PVMOVE", "LOCKED"]
flags = 
allocation_policy = "contiguous"
segment_count = 0
I searched on the net “pvmove0” and found that someone had the same problem and remove it by:
- doing a backup of the metadata (see above)
- editing the file by removing the pvmove0 section
- restoring the edited backup with vgcfgrestore.
- rebooting (and celebrating)
Apparently, having such an empty logical volume breaks things at several levels (among others, the graphical tool system-config-lvm would not start).