From 6cf1eff46d2ec32363576ea21318fc8036656e07 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mon, 7 Mar 2016 14:15:33 -0600 Subject: [PATCH] toollib: always process in use pvs With the recent conversion of pvcreate/pvremove to the common toollib processing function, skipping in-use PVs in _process_pvs_in_vg prevented them from being protected as intended by the in-use flag. The processing code for pvcreate/pvremove checks for the in-use state itself and prevents using an in-use PV. If a PV is skipped, it looks like an unused device and is not protected from being used in pvcreate/pvremove. --- tools/toollib.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/toollib.c b/tools/toollib.c index 14aca1503..2ff5a3b1d 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -3049,12 +3049,6 @@ static int _process_pvs_in_vg(struct cmd_context *cmd, pv = pvl->pv; pv_name = pv_dev_name(pv); - if (cmd->system_id && is_orphan(pv) && is_used_pv(pv)) { - log_verbose("PV %s is used by a VG but its metadata is missing.", pv_name); - log_verbose("Skipping PV %s because it's not possible to decide whether it matches system id.", pv_name); - continue; - } - process_pv = process_all_pvs; /* Remove each arg_devices entry as it is processed. */