{"id":45,"date":"2013-10-22T16:25:11","date_gmt":"2013-10-22T23:25:11","guid":{"rendered":"http:\/\/inbaudwetrust.com\/?p=45"},"modified":"2013-10-22T16:25:11","modified_gmt":"2013-10-22T23:25:11","slug":"working-with-volume-groups-that-have-the-same-name-cloned-disk-recoveries-etc","status":"publish","type":"post","link":"https:\/\/inbaudwetrust.com\/wp\/?p=45","title":{"rendered":"Working with volume groups that have the same name (cloned disk, recoveries, etc)"},"content":{"rendered":"<p>First, we attach the vmdk to the vm and then scan the bus to see it in linux:<br \/>\n# echo &#8220;- &#8211; -&#8221; > \/sys\/class\/scsi_host\/host0\/scan<\/p>\n<p>In this scenario, \/dev\/sda2 and \/dev\/sdb2 have the same volume group name of VolGroup00, let&#8217;s rename \/dev\/sdb2 to VolGroup01:<br \/>\n# vgimportclone &#8211;basevgname VolGroup01 \/dev\/sdb2<\/p>\n<p>next let&#8217;s find the new VolumeGroup:<br \/>\n# vgscan<br \/>\n# vgchange -a y<\/p>\n<p>Now let&#8217;s mount the LV we want from the new volume group:<br \/>\n# mount \/dev\/VolGroup01\/LogVol02 \/mnt\/restore\/<\/p>\n<p>Once we&#8217;re done, we want to unmount the LV and remove reference to the VG<br \/>\n# umount \/mnt\/restore<br \/>\n# vgchange -an VolGroup01   (make VG unavailable)<br \/>\n# sync<\/p>\n<p>Remove the drive, wait a few minutes and let&#8217;s do a rescan:<br \/>\n# vgscan <\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, we attach the vmdk to the vm and then scan the bus to see it in linux: # echo &#8220;- &#8211; -&#8221; > \/sys\/class\/scsi_host\/host0\/scan In this scenario, \/dev\/sda2 and \/dev\/sdb2 have the same volume group name of VolGroup00, let&#8217;s rename \/dev\/sdb2 to VolGroup01: # vgimportclone &#8211;basevgname VolGroup01 \/dev\/sdb2 next let&#8217;s find the new VolumeGroup:&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-linux","category-tech"],"_links":{"self":[{"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":0,"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"wp:attachment":[{"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inbaudwetrust.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}