diff options
author | Petr Rockai <prockai@redhat.com> | 2010-12-14 17:51:09 +0000 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2010-12-14 17:51:09 +0000 |
commit | ebfe96cad5162a8d947c4f57505e25bd039bafaf (patch) | |
tree | 2696bcde244c3698d27d63c835ffd096e6ed33a5 /tools | |
parent | d6d4e462a44a9f1348f2f81f7091c11ce3c777f0 (diff) | |
download | lvm2-ebfe96cad5162a8d947c4f57505e25bd039bafaf.tar.gz lvm2-ebfe96cad5162a8d947c4f57505e25bd039bafaf.tar.xz lvm2-ebfe96cad5162a8d947c4f57505e25bd039bafaf.zip |
Add further consistency checking to vg_validate, ensuring that all segment
areas point to LVs or PVs that are listed in the respective VG.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/vgmerge.c | 4 | ||||
-rw-r--r-- | tools/vgsplit.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/vgmerge.c b/tools/vgmerge.c index 4d55510e..391764f9 100644 --- a/tools/vgmerge.c +++ b/tools/vgmerge.c @@ -114,6 +114,10 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to, } } + dm_list_iterate_items(lvl1, &vg_from->lvs) { + lvl1->lv->vg = vg_to; + } + while (!dm_list_empty(&vg_from->lvs)) { struct dm_list *lvh = vg_from->lvs.n; diff --git a/tools/vgsplit.c b/tools/vgsplit.c index 045c699f..bd2f0ab3 100644 --- a/tools/vgsplit.c +++ b/tools/vgsplit.c @@ -34,6 +34,7 @@ static int _move_one_lv(struct volume_group *vg_from, struct logical_volume *lv = dm_list_item(lvh, struct lv_list)->lv; dm_list_move(&vg_to->lvs, lvh); + lv->vg = vg_to; if (lv_is_active(lv)) { log_error("Logical volume \"%s\" must be inactive", lv->name); |