From 805dad594065f76ce2281d863efb71cc1342bfde Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 13 Oct 2006 13:22:44 +0000 Subject: [PATCH] Propagate clustered flag in vgsplit and require resizeable flag. --- WHATS_NEW | 1 + tools/vgsplit.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index b4375b7b5..8c607b976 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.12 - =================================== + Propogate clustered flag in vgsplit and require resizeable flag. Version 2.02.11 - 12th October 2006 =================================== diff --git a/tools/vgsplit.c b/tools/vgsplit.c index 75dde7750..3578b9516 100644 --- a/tools/vgsplit.c +++ b/tools/vgsplit.c @@ -209,6 +209,12 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv) return ECMD_FAILED; } + if (!(vg_from->status & RESIZEABLE_VG)) { + log_error("Volume group \"%s\" is not resizeable", vg_from->name); + unlock_vg(cmd, vg_name_from); + return ECMD_FAILED; + } + if (!(vg_from->status & LVM_WRITE)) { log_error("Volume group \"%s\" is read-only", vg_from->name); unlock_vg(cmd, vg_name_from); @@ -248,6 +254,9 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv) vg_from->alloc, 0, NULL))) goto error; + if (vg_from->status & CLUSTERED) + vg_to->status |= CLUSTERED; + /* Archive vg_from before changing it */ if (!archive(vg_from)) goto error;