]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: also remove pvs with lvm zap --destroy
authorAndrew Schoen <aschoen@redhat.com>
Thu, 18 Jan 2018 17:10:48 +0000 (11:10 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 18 Jan 2018 17:12:31 +0000 (11:12 -0600)
Leaving the pv around doesn't keep us from redeploying on
that device because we also wipefs, but explicitly destroying
it makes the output read better.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/zap.py

index 537c0cddda27083aeaa2ba847a0435935d916b1b..f7ec1116934d1170ea4e9f0a192a3fd4256ff4d6 100644 (file)
@@ -69,6 +69,9 @@ class Zap(object):
                 logger.info("Destroying volume group %s because --destroy was given", vg_name)
                 terminal.write("Destroying volume group %s because --destroy was given" % vg_name)
                 api.remove_vg(vg_name)
+                logger.info("Destroying physical volume %s because --destroy was given", device)
+                terminal.write("Destroying physical volume %s because --destroy was given" % device)
+                api.remove_pv(device)
 
         wipefs(path)
         zap_data(path)