mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
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.
This commit is contained in:
parent
a8319e62c0
commit
6cf1eff46d
@ -3049,12 +3049,6 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
|
|||||||
pv = pvl->pv;
|
pv = pvl->pv;
|
||||||
pv_name = pv_dev_name(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;
|
process_pv = process_all_pvs;
|
||||||
|
|
||||||
/* Remove each arg_devices entry as it is processed. */
|
/* Remove each arg_devices entry as it is processed. */
|
||||||
|
Loading…
Reference in New Issue
Block a user