mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
toollib: skip PV if system ID is used and PV marked as used but metadata missing
If we know that a PV belongs to some VG and we're missing metadata (because we have only those PV(s) from VG present in the system that don't have metadata areas), we should skip such PV when processing under system ID. This is because we know that the PV belongs to some VG, but we really can't decide whether it matches system ID unless the VG metadata is present again.
This commit is contained in:
parent
0000db7f98
commit
cc9e683adc
@ -1,5 +1,6 @@
|
||||
Version 2.02.143 -
|
||||
=====================================
|
||||
If PV belongs to some VG and metadata missing, skip it if system ID is used.
|
||||
Automatically change PV header extension to latest version if writing PV/VG.
|
||||
Identify used PVs in pv_attr field by new 'u' character.
|
||||
Add pv_in_use reporting field to report if PV is used or not.
|
||||
|
@ -3067,6 +3067,12 @@ 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 belonging to 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. */
|
||||
|
Loading…
Reference in New Issue
Block a user