diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2011-02-28 13:19:02 +0000 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2011-02-28 13:19:02 +0000 |
commit | 3b97e8d643d06f3f3391bc3625d49726fc0f5ad8 (patch) | |
tree | 9c7250ba454f87ea13b0885b4f667371be24279d /tools/vgreduce.c | |
parent | 1a52fa6858ed6cc849914bf0c23259bd8821289c (diff) | |
download | lvm2-3b97e8d643d06f3f3391bc3625d49726fc0f5ad8.tar.gz lvm2-3b97e8d643d06f3f3391bc3625d49726fc0f5ad8.tar.xz lvm2-3b97e8d643d06f3f3391bc3625d49726fc0f5ad8.zip |
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).
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r-- | tools/vgreduce.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |