From 3b97e8d643d06f3f3391bc3625d49726fc0f5ad8 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Mon, 28 Feb 2011 13:19:02 +0000 Subject: Allow non-orphan PVs with two metadata areas to be resized. We allow writing non-orphan PVs only for resize now. The "orphan PV" assert in pv_write fn uses the "allow_non_orphan" parameter to control this assert. However, we should find a more elaborate solution so we can remove this restriction altogether (pv_write together with vg_write is not atomic, we need to find a safe mechanism so there's an easy revert possible in case of an error). --- tools/vgreduce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/vgreduce.c') diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 8d3cb1cd..d497c762 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -438,7 +438,7 @@ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg, goto bad; } - if (!pv_write(cmd, pv)) { + if (!pv_write(cmd, pv, 0)) { log_error("Failed to clear metadata from physical " "volume \"%s\" " "after removal from \"%s\"", name, vg->name); -- cgit