1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Fix and clarify vgsplit error messages.

This commit is contained in:
Milan Broz 2007-05-15 13:01:41 +00:00
parent 5ead2706b4
commit e0592c58b3
2 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.26 -
=================================
Fix and clarify vgsplit error messages.
Fix a segfault if a device has no target (no table)
Add some more debuglogs to clvmd startup.
Misc clvmd cleanups

View File

@ -145,13 +145,16 @@ static int _move_snapshots(struct volume_group *vg_from,
list_iterate_items(seg, &lv->segments) {
cow_from = _lv_is_in_vg(vg_from, seg->cow);
origin_from = _lv_is_in_vg(vg_from, seg->origin);
if (cow_from && origin_from)
continue;
if ((!cow_from && origin_from) ||
(cow_from && !origin_from)) {
log_error("Can't split snapshot %s between"
" two Volume Groups", seg->cow->name);
return 0;
}
}
if (cow_from && origin_from)
continue;
if ((!cow_from && origin_from) || (cow_from && !origin_from)) {
log_error("Snapshot %s split", seg->cow->name);
return 0;
}
/* Move this snapshot */
list_del(lvh);
@ -190,7 +193,8 @@ static int _move_mirrors(struct volume_group *vg_from,
if ((seg_in && seg_in < seg->area_count) ||
(seg_in && seg->log_lv && !log_in) ||
(!seg_in && seg->log_lv && log_in)) {
log_error("Mirror %s split", lv->name);
log_error("Can't split mirror %s between "
"two Volume Groups", lv->name);
return 0;
}