1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

Fix vgsplit if splitting all PVs from VG.

This commit is contained in:
Milan Broz 2007-06-28 17:59:34 +00:00
parent e7ddf4168d
commit b9567c9561
2 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.27 -
================================
Fix vgsplit if splitting all PVs from VG.
Fix lvmdiskscan volume reporting when run in the lvm shell
Fix missing lvm_shell symbol in lvm2cmd library. (2.02.23)
Add vg_status function and clean up vg->status in tools directory.

View File

@ -320,7 +320,7 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
goto error;
/* Split metadata areas and check if both vgs have at least one area */
if (!(vg_split_mdas(cmd, vg_from, vg_to))) {
if (!(vg_split_mdas(cmd, vg_from, vg_to)) && vg_from->pv_count) {
log_error("Cannot split: Nowhere to store metadata for new Volume Group");
goto error;
}
@ -344,10 +344,12 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
backup(vg_to);
/* Write out updated old VG */
if (!vg_write(vg_from) || !vg_commit(vg_from))
goto error;
if (vg_from->pv_count) {
if (!vg_write(vg_from) || !vg_commit(vg_from))
goto error;
backup(vg_from);
backup(vg_from);
}
/* Remove EXPORTED flag from new VG */
consistent = 1;