1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

When mirrors are created with the --nosync option, a status flag

(MIRROR_NOTSYNCED) is added to the LVM metadata.  This flag is
not cleared when converting to linear.  Subsequently, if you
up-convert the linear to a mirror, the flag remains - even though
an up-convert will always force a complete resync.
This commit is contained in:
Jonathan Earl Brassow 2007-08-29 20:19:11 +00:00
parent f603fe64bd
commit a2cb3d17a7
2 changed files with 5 additions and 1 deletions

View File

@ -198,6 +198,7 @@ int remove_mirror_images(struct lv_segment *mirrored_seg, uint32_t num_mirrors,
extents = lv1->le_count;
_move_lv_segments(mirrored_seg->lv, lv1);
mirrored_seg->lv->status &= ~MIRRORED;
mirrored_seg->lv->status &= ~MIRROR_NOTSYNCED;
remove_log = 1;
/* Replace mirror with error segment */
segtype = get_segtype_from_string(mirrored_seg->lv->vg->cmd, "error");

View File

@ -418,8 +418,11 @@ static int lvconvert_mirrors(struct cmd_context * cmd, struct logical_volume * l
if (sync_percent >= 100.0)
init_mirror_in_sync(1);
else
else {
/* A full resync will take place */
lv->status &= ~MIRROR_NOTSYNCED;
init_mirror_in_sync(0);
}
if (!remove_mirror_images(seg, lp->mirrors,
lp->pv_count ?