{"id":234,"date":"2018-12-31T18:05:45","date_gmt":"2018-12-31T18:05:45","guid":{"rendered":"https:\/\/unsrewiki.1sys1.com\/?p=234"},"modified":"2019-05-03T06:51:50","modified_gmt":"2019-05-03T06:51:50","slug":"duplicate-lvm-volume-group-warning","status":"publish","type":"post","link":"https:\/\/server-help.org\/index.php\/2018\/12\/31\/duplicate-lvm-volume-group-warning\/","title":{"rendered":"Duplicate LVM Volume Group Warning"},"content":{"rendered":"\n<p>At startup, the <code>vgscan<\/code> command is run to  scan the block devices on the system looking for LVM labels, to  determine which of them are physical volumes and to read the metadata  and build up a list of volume groups. The names of the physical volumes  are stored in the LVM cache file of each node in the system, <code>\/etc\/lvm\/cache\/.cache<\/code>. Subsequent commands may read that file to avoiding rescanning. <\/p>\n\n\n\n<p>The following LVM errors were observed: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># pvs\n  WARNING: found device with duplicate \/dev\/md3\n  WARNING: found device with duplicate \/dev\/sdb3\n  WARNING: Disabling lvmetad cache which does not support duplicate PVs.\n  WARNING: Scan found duplicate PVs.\n  WARNING: Not using lvmetad because cache update failed.\n  WARNING: Not using device \/dev\/md3 for PV XHC1A9-kwD8-k5pO-i8sS-zoiV-RfWP-e8oSUb.\n  WARNING: Not using device \/dev\/sdb3 for PV XHC1A9-kwD8-k5pO-i8sS-zoiV-RfWP-e8oSUb.\n  WARNING: PV XHC1A9-kwD8-k5pO-i8sS-zoiV-RfWP-e8oSUb prefers device \/dev\/sda3 because of previous preference.\n  WARNING: PV XHC1A9-kwD8-k5pO-i8sS-zoiV-RfWP-e8oSUb prefers device \/dev\/sda3 because of previous preference.\n  WARNING: Device mismatch detected for vg00\/usr which is accessing \/dev\/md3 instead of \/dev\/sda3.\n  WARNING: Device mismatch detected for vg00\/var which is accessing \/dev\/md3 instead of \/dev\/sda3.\n  WARNING: Device mismatch detected for vg00\/home which is accessing \/dev\/md3 instead of \/dev\/sda3.\n  PV         VG   Fmt  Attr PSize   PFree\n  \/dev\/sda3  vg00 lvm2 a--  925.51g 910.51g<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Resolution<\/h2>\n\n\n\n<p>To update the LVM filter do the following: <\/p>\n\n\n\n<p>1- Make a Backup of \/etc\/lvm\/lvm.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cp \/etc\/lvm\/lvm.conf \/etc\/lvm\/lvm.conf.bak<\/code><\/pre>\n\n\n\n<p>2- Edit \/etc\/lvm\/lvm.conf with any Text Editor (vi or nano)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># vi \/etc\/lvm\/lvm.conf<\/code><\/pre>\n\n\n\n<p>3- Search for <strong>filter = [ <\/strong> , to search with Text file using vi, press \/ and type the keyword. To navigate within the search press <strong>n<\/strong>. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># This configuration option has an automatic default value.\n# filter = [ \"a|.*\/|\" ]<\/code><\/pre>\n\n\n\n<p>4- Uncomment the Second line, and replace the current values with the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        # This configuration option has an automatic default value.\n        filter = [ \"a|\/dev\/md.*|\", \"r\/.*\/\" ]<\/code><\/pre>\n\n\n\n<p>5- Save, and exit lvm.conf file, by pressing <strong>Esc<\/strong> from Keyboard to exit Insert mode, then press <strong>:wq!<\/strong><\/p>\n\n\n\n<p>6- Run <strong>vgscan<\/strong><\/p>\n\n\n\n<p>7- Run <strong>pvscan<\/strong> to confirm the error is no longer present.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At startup, the vgscan command is run to scan the block devices on the system looking for LVM labels, to determine which of them are physical volumes and to read the metadata and build up a list of volume groups. The names of the physical volumes are stored in the LVM cache file of each&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"_links":{"self":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/234"}],"collection":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":5,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/234\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/234\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/media?parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/categories?post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/tags?post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}