{"id":1504,"date":"2017-03-08T19:09:42","date_gmt":"2017-03-09T02:09:42","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=1504"},"modified":"2017-03-08T19:09:42","modified_gmt":"2017-03-09T02:09:42","slug":"centos-remove-volume-group-and-disk","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1504","title":{"rendered":"CentOS &#8211; remove volume, group and disk"},"content":{"rendered":"<p>CentOS 7<br \/>\nVMware ESXi<\/p>\n<p>I used the following method to remove a disk from a system.  Note: In this case the volume group only had one volume on it.<\/p>\n<p>Disk: \/dev\/sde<br \/>\nVolume Name: \/dev\/vg_name\/lv_name<br \/>\nVolume Group Name: vg_name<\/p>\n<p>Remove all volumes in a group:<\/p>\n<blockquote><p># lvremove vg_name<br \/>\nDo you really want to remove active logical volume lv_name? [y\/n]: y<br \/>\n  Logical volume &#8220;lv_name&#8221; successfully removed<\/p><\/blockquote>\n<p>Remove the group:<\/p>\n<blockquote><p># vgremove vg_name<br \/>\n  Volume group &#8220;vg_name&#8221; successfully removed<\/p><\/blockquote>\n<p>Remove the volume:<\/p>\n<blockquote><p># pvremove -v \/dev\/sde<br \/>\n    Wiping cache of LVM-capable devices<br \/>\n  Labels on physical volume &#8220;\/dev\/sde&#8221; successfully wiped<\/p><\/blockquote>\n<p>I deleted the disk from vSphere, and then rescan for the changes:<\/p>\n<blockquote><p># echo &#8220;- &#8211; -&#8221; > \/sys\/class\/scsi_host\/host0\/scan<\/p><\/blockquote>\n<p>Verify that the disk is no longer there:<\/p>\n<blockquote><p># fdisk -l \/dev\/sde<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 VMware ESXi I used the following method to remove a disk from a system. Note: In this case the volume group only had one volume on it. Disk: \/dev\/sde Volume Name: \/dev\/vg_name\/lv_name Volume Group Name: vg_name Remove all volumes in a group: # lvremove vg_name Do you really want to remove active logical [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[40,88,203,303],"class_list":["post-1504","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-centos","tag-group","tag-lvm","tag-volume"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1504"}],"version-history":[{"count":1,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1504\/revisions"}],"predecessor-version":[{"id":1505,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1504\/revisions\/1505"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}