If the disk being zapped is used by lvm (if it contains the
lvm label and hasn't been pvremove'd) it's safer to simply
bail out of zapping it than attempt teardown through a force
pvremove, because the disk being zapped might be in fact in
use by some LV.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- ceph-osd/ +/804520 /opendev. org/openstack/ charm-ceph- osd/commit/ 489a4ede69c72ce 930a0909af5fffe 2a9faa8d1a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 489a4ede69c72ce 930a0909af5fffe 2a9faa8d1a
Author: Nikhil Kshirsagar <email address hidden>
Date: Fri Aug 13 16:59:42 2021 +0530
Do not zap a disk if it is used by lvm2
If the disk being zapped is used by lvm (if it contains the
lvm label and hasn't been pvremove'd) it's safer to simply
bail out of zapping it than attempt teardown through a force
pvremove, because the disk being zapped might be in fact in
use by some LV.
Closes-Bug: 1858519 3e367c604ab51ce 2ef3789ff7f
Change-Id: I111475c5a4584a