1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Propagate clustered flag in vgsplit and require resizeable flag.

This commit is contained in:
Alasdair Kergon 2006-10-13 13:22:44 +00:00
parent 89a4e806e9
commit 805dad5940
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.12 - Version 2.02.12 -
=================================== ===================================
Propogate clustered flag in vgsplit and require resizeable flag.
Version 2.02.11 - 12th October 2006 Version 2.02.11 - 12th October 2006
=================================== ===================================

View File

@ -209,6 +209,12 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED; 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)) { if (!(vg_from->status & LVM_WRITE)) {
log_error("Volume group \"%s\" is read-only", vg_from->name); log_error("Volume group \"%s\" is read-only", vg_from->name);
unlock_vg(cmd, vg_name_from); 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))) vg_from->alloc, 0, NULL)))
goto error; goto error;
if (vg_from->status & CLUSTERED)
vg_to->status |= CLUSTERED;
/* Archive vg_from before changing it */ /* Archive vg_from before changing it */
if (!archive(vg_from)) if (!archive(vg_from))
goto error; goto error;