summaryrefslogtreecommitdiffstats
path: root/tools/vgsplit.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-10-13 13:22:44 +0000
committerAlasdair Kergon <agk@redhat.com>2006-10-13 13:22:44 +0000
commit805dad594065f76ce2281d863efb71cc1342bfde (patch)
tree16d2c58d75ed2cce09a0e5f02a2c399a0a58027a /tools/vgsplit.c
parent89a4e806e972aa46c379fa445f7de1beee9bbfa9 (diff)
downloadlvm2-805dad594065f76ce2281d863efb71cc1342bfde.tar.gz
lvm2-805dad594065f76ce2281d863efb71cc1342bfde.tar.xz
lvm2-805dad594065f76ce2281d863efb71cc1342bfde.zip
Propagate clustered flag in vgsplit and require resizeable flag.
Diffstat (limited to 'tools/vgsplit.c')
-rw-r--r--tools/vgsplit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/vgsplit.c b/tools/vgsplit.c
index 75dde775..3578b951 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;