1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00

validation: check external property is matching

Detect if number of external_count is matching
referencing devices for  external_origin LV.
This commit is contained in:
Zdenek Kabelac 2016-12-17 21:58:35 +01:00
parent 7db46c4a39
commit 36f609e513
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.169 -
=====================================
Extend metadata validation of external origin LV use count.
Fix dm table when the last user of active external origin is removed.
Improve reported lvs status for active external origin volume.
Fix table load for splitted RAID LV and require explicit activation.

View File

@ -398,6 +398,18 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)
inc_error_count;
}
}
if (lv_is_external_origin(lv)) {
seg_found = 0;
dm_list_iterate_items(sl, &lv->segs_using_this_lv)
if (sl->seg->external_lv == lv)
seg_found++;
if (seg_found != lv->external_count) {
log_error("LV %s: external origin count does not match.",
lv->name);
inc_error_count;
}
}
}
dm_list_iterate_items(seg, &lv->segments) {