_outf(f, "%s_count = %u%s", type, seg->area_count,
(seg->area_count == 1) ? "\t# linear" : "");
+ if ((seg->type == SEG_MIRRORED) && (seg->status & PVMOVE))
+ _out_size(f, (uint64_t) seg->extents_moved,
+ "extents_moved = %u", seg->extents_moved);
+
if ((seg->type == SEG_STRIPED) && (seg->area_count > 1))
_out_size(f, (uint64_t) seg->stripe_size,
"stripe_size = %u", seg->stripe_size);
{EXPORTED_VG, "EXPORTED"},
{RESIZEABLE_VG, "RESIZEABLE"},
{PARTIAL_VG, "PARTIAL"},
- {PVMOVE_VG, "PVMOVE"},
+ {PVMOVE, "PVMOVE"},
{LVM_READ, "READ"},
{LVM_WRITE, "WRITE"},
{CLUSTERED, "CLUSTERED"},
{LVM_WRITE, "WRITE"},
{FIXED_MINOR, "FIXED_MINOR"},
{VISIBLE_LV, "VISIBLE"},
+ {PVMOVE, "PVMOVE"},
+ {LOCKED, "LOCKED"},
{0, NULL}
};
}
/* Perform full scan and try again */
- cache_label_scan(fmt->cmd, 0);
+ cache_label_scan(fmt->cmd, 1);
if (info->vginfo && info->vginfo->vgname && *info->vginfo->vgname &&
_get_pv_from_vg(info->fmt, info->vginfo->vgname, info->dev->pvid,
struct config_value *cv;
const char *seg_name = sn->key;
uint32_t start_extent, extent_count;
- uint32_t chunk_size;
+ uint32_t chunk_size, extents_moved = 0u, seg_status = 0u;
const char *org_name, *cow_name;
struct logical_volume *org, *cow, *lv1;
segment_type_t segtype;
"segment '%s'.", sn->key);
return 0;
}
+
+ if (find_config_node(sn, "extents_moved", '/')) {
+ if (_read_uint32(sn, "extents_moved", &extents_moved))
+ seg_status |= PVMOVE;
+ else {
+ log_error("Couldn't read 'extents_moved' for "
+ "segment '%s'.", sn->key);
+ return 0;
+ }
+ }
}
if (!(seg = pool_zalloc(mem, sizeof(*seg) +
seg->len = extent_count;
seg->area_len = extent_count;
seg->type = segtype;
+ seg->status = seg_status;
+ seg->extents_moved = extents_moved;
switch (segtype) {
case SEG_SNAPSHOT: