]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: remove lvm metadata when zapping an lv
authorAndrew Schoen <aschoen@redhat.com>
Thu, 19 Oct 2017 19:55:44 +0000 (14:55 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 27 Oct 2017 16:15:43 +0000 (11:15 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/zap.py

index 03fd6833566d0250760170bfa29a01c66af15cfd..2c5c9836f330e7754d450b2d54339260069d0add 100644 (file)
@@ -63,6 +63,10 @@ class Zap(object):
         wipefs(path)
         zap_data(path)
 
+        if lv:
+            # remove all lvm metadata
+            lv.clear_tags()
+
     def main(self):
         sub_command_help = dedent("""
         Zaps the given logical volume or partition. If given a path to a logical