{"id":1575,"date":"2018-01-07T12:08:56","date_gmt":"2018-01-07T11:08:56","guid":{"rendered":"https:\/\/www.hutsky.cz\/blog\/?p=1575"},"modified":"2018-01-07T22:16:38","modified_gmt":"2018-01-07T21:16:38","slug":"kvm-cannot-find-any-matching-source-devices-for-logical-volume-group-vg2","status":"publish","type":"post","link":"https:\/\/www.hutsky.cz\/blog\/2018\/01\/kvm-cannot-find-any-matching-source-devices-for-logical-volume-group-vg2\/","title":{"rendered":"KVM: Cannot find any matching source devices for logical volume group vg2"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1581\" src=\"https:\/\/www.hutsky.cz\/blog\/wp-content\/uploads\/4-virtual-machines-300px.png\" alt=\"\" width=\"300\" height=\"114\" srcset=\"https:\/\/www.hutsky.cz\/blog\/wp-content\/uploads\/4-virtual-machines-300px.png 300w, https:\/\/www.hutsky.cz\/blog\/wp-content\/uploads\/4-virtual-machines-300px-100x38.png 100w, https:\/\/www.hutsky.cz\/blog\/wp-content\/uploads\/4-virtual-machines-300px-150x57.png 150w, https:\/\/www.hutsky.cz\/blog\/wp-content\/uploads\/4-virtual-machines-300px-200x76.png 200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>I installed Centos 7 on a brand new machine about a half a year ago, and set up KVM with two data pools &#8211; one just a regular directory for old raw images, the second being an LVM volume group. Later, I added one additional physical disk to the machine, for local backups, which turned out to be an important detail later.<\/p>\n<p>Nowadays I wanted to start a new virtual machine but to my surprise, the data pool based on LVM volume group &#8216;vg2&#8217; wasn&#8217;t active:<\/p>\n<pre class=\"\"># virsh pool-list\r\nName State Autostart \r\n-------------------------------------------\r\nbackups active yes \r\nvg2 inactive yes<\/pre>\n<p>The LVM itself seemed to be working just fine, as well as the one virtual machine which was already residing in a logical volume in this particular data pool. But the data pool would not get activated, no matter if I tried from virsh:<\/p>\n<pre class=\"bz_comment_text bz_wrap_comment_text\" id=\"comment_text_0\">unsupported configuration: cannot find any matching source devices for logical volume group 'vg2'<\/pre>\n<p>or from virt-manager:<\/p>\n<pre class=\"bz_comment_text bz_wrap_comment_text \" id=\"comment_text_0\">Error starting pool 'vg2': unsupported configuration: cannot find any\r\nmatching source devices for logical volume group 'vg2'<\/pre>\n<p>Eventually, it turned out that when I had added the physical disk for backups into the machine back then, this new disk got \/dev\/<strong>sda<\/strong> assigned while the original old disk got \/dev\/<strong>sdb<\/strong> as the device name. LVM was able to cope with the change, but libvirt remembered the original value:<\/p>\n<pre class=\"\"># virsh pool-dumpxml vg2\r\n&lt;pool type='logical'&gt;\r\n &lt;name&gt;vg2&lt;\/name&gt;\r\n &lt;uuid&gt;&lt;\/uuid&gt;\r\n &lt;capacity unit='bytes'&gt;1351803207680&lt;\/capacity&gt;\r\n &lt;allocation unit='bytes'&gt;461373440000&lt;\/allocation&gt;\r\n &lt;available unit='bytes'&gt;890429767680&lt;\/available&gt;\r\n &lt;source&gt;\r\n &lt;device path='\/dev\/sda7'\/&gt;\r\n &lt;name&gt;vg2&lt;\/name&gt;\r\n &lt;format type='lvm2'\/&gt;\r\n &lt;\/source&gt;\r\n &lt;target&gt;\r\n &lt;path&gt;\/dev\/vg2&lt;\/path&gt;\r\n &lt;\/target&gt;\r\n&lt;\/pool&gt;<\/pre>\n<p>Luckily for me, <a href=\"https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=1411600\">I was not the first one to run into this issue<\/a>, so it was an easy fix:<\/p>\n<pre class=\"\"> &lt;device path='\/dev\/sdb7'\/&gt;<\/pre>\n<p>After changing the device path to the correct device name, data pool was able to start again. In the referenced bug ticket, it was stated that removing the device path altogether works just as well and might actually be a better option because device path is only needed when storage pool is being defined for the first time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I installed Centos 7 on a brand new machine about a half a year ago, and set up KVM with two data pools &#8211; one just a regular directory for old raw images, the second being an LVM volume group. &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.hutsky.cz\/blog\/2018\/01\/kvm-cannot-find-any-matching-source-devices-for-logical-volume-group-vg2\/\"> <span class=\"screen-reader-text\">KVM: Cannot find any matching source devices for logical volume group vg2<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52,8],"tags":[39,48,18],"class_list":["post-1575","post","type-post","status-publish","format-standard","hentry","category-hardware","category-operatingsystems","tag-centos","tag-hardware","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts\/1575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/comments?post=1575"}],"version-history":[{"count":9,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts\/1575\/revisions"}],"predecessor-version":[{"id":1586,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts\/1575\/revisions\/1586"}],"wp:attachment":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/media?parent=1575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/categories?post=1575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/tags?post=1575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}