

{"id":2069,"date":"2018-05-04T23:07:15","date_gmt":"2018-05-04T21:07:15","guid":{"rendered":"https:\/\/fabsk.eu\/blog\/?p=2069"},"modified":"2018-05-04T23:11:36","modified_gmt":"2018-05-04T21:11:36","slug":"kubuntu-17-04-to-18-04-a-little-scare-with-lvm","status":"publish","type":"post","link":"https:\/\/fabsk.eu\/blog\/2018\/05\/04\/kubuntu-17-04-to-18-04-a-little-scare-with-lvm\/","title":{"rendered":"Kubuntu 17.04 to 18.04: hidden empty LVM logical volume, no boot"},"content":{"rendered":"<p>After the update from Kubuntu 17.04 to 18.04 and a reboot, my system refused to boot and only gave me \u00ab\u00a0emergency mode\u00a0\u00bb. Long story short: for an unknown reason I had an empty volume \u00ab\u00a0<em>pvmove0<\/em>\u00a0\u00bb that the new version did not like, and after removing it it worked.<\/p>\n<h1>What was in the journal?<\/h1>\n<p>I had a look at the system journal with this command (the <em>LANG<\/em> is to have all messages in English, which is easier to find on the net than French):<\/p>\n<pre>LANG=\"en_GB.UTF-8\" journalctl -xb<\/pre>\n<p>I had lines like that:<\/p>\n<pre>May 04 20:46:05 mymachine lvm[415]: LV pvmove0: has no segment.\r\nMay 04 20:46:05 mymachine lvm[415]: Couldn't read all logical volumes for volume group fablvm.<\/pre>\n<p>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.<\/p>\n<h1>The mysterious Logical Volume pvmove0<\/h1>\n<p>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.<\/p>\n<pre>vgcfgbackup -f path\/to\/my\/backup.vg my_vg<\/pre>\n<p>Then I looked at the backup file and (holy cow!) I saw that I had an empty Logical Volume called \u00ab\u00a0<em>pvmove0<\/em>\u00ab\u00a0.<\/p>\n<pre>pvmove0 {\r\n id = \"Jp8y0E-RYIU-g4s0-PdUs-LEdo-N110-MLBwmQ\"\r\n status = [\"READ\", \"WRITE\", \"PVMOVE\", \"LOCKED\"]\r\n flags = []\r\n allocation_policy = \"contiguous\"\r\n segment_count = 0\r\n}<\/pre>\n<p>I searched on the net \u00ab\u00a0<em>pvmove0<\/em>\u00a0\u00bb and found that someone <a href=\"https:\/\/serverfault.com\/questions\/584500\/how-do-i-remove-a-locked-logical-volume-pvmove0-left-over-after-a-disk-error\/585453#585453\">had the same problem<\/a> and remove it by:<\/p>\n<ul>\n<li>doing a backup of the metadata (see above)<\/li>\n<li>editing the file by removing the <em>pvmove0<\/em> section<\/li>\n<li>restoring the edited backup with <em>vgcfgrestore<\/em>.<\/li>\n<li>rebooting (and celebrating)<\/li>\n<\/ul>\n<p>Apparently, having such an empty logical volume breaks things at several levels (among others, the graphical tool <em>system-config-lvm<\/em> would not start).<\/p>\n<div class=\"SnapLinksContainer\" style=\"margin-left: 0px; margin-top: 0px; display: none;\">\n<div class=\"SL_SelectionRect\">\n<div class=\"SL_SelectionLabel\" style=\"right: 2px; bottom: 2px;\">0 Links<\/div>\n<\/div>\n<p><!-- Used for easily cloning the properly namespaced rect --><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>After the update from Kubuntu 17.04 to 18.04 and a reboot, my system refused to boot and only gave me \u00ab\u00a0emergency mode\u00a0\u00bb. Long story short: for an unknown reason I had an empty volume \u00ab\u00a0pvmove0\u00a0\u00bb that the new version did not like, and after removing it it worked. What was in the journal? I had [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,19],"tags":[],"class_list":["post-2069","post","type-post","status-publish","format-standard","hentry","category-informatique","category-linux","\"lang=\"en"],"_links":{"self":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts\/2069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/comments?post=2069"}],"version-history":[{"count":5,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts\/2069\/revisions"}],"predecessor-version":[{"id":2074,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts\/2069\/revisions\/2074"}],"wp:attachment":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/media?parent=2069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/categories?post=2069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/tags?post=2069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}