ceph-volume lvm.zap use remove_pv only for physical devices

Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
Alfredo Deza 2018-09-13 09:34:54 -04:00
parent 0551d0e14b
commit 036683fde7

View File

@ -100,8 +100,9 @@ class Zap(object):
for vg_name in vgs:
mlogger.info("Destroying volume group %s because --destroy was given", vg_name)
api.remove_vg(vg_name)
mlogger.info("Destroying physical volume %s because --destroy was given", device)
api.remove_pv(device)
if not lv:
mlogger.info("Destroying physical volume %s because --destroy was given", device)
api.remove_pv(device)
wipefs(path)
zap_data(path)