public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mbroz@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW tools/vgsplit.c
Date: Thu, 28 Jun 2007 17:59:00 -0000	[thread overview]
Message-ID: <20070628175935.7684.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2007-06-28 17:59:34

Modified files:
	.              : WHATS_NEW 
	tools          : vgsplit.c 

Log message:
	Fix vgsplit if splitting all PVs from VG.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.642&r2=1.643
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.30&r2=1.31

--- LVM2/WHATS_NEW	2007/06/28 17:33:43	1.642
+++ LVM2/WHATS_NEW	2007/06/28 17:59:34	1.643
@@ -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.
--- LVM2/tools/vgsplit.c	2007/06/15 22:16:55	1.30
+++ LVM2/tools/vgsplit.c	2007/06/28 17:59:34	1.31
@@ -320,7 +320,7 @@
 		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 @@
 	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;


             reply	other threads:[~2007-06-28 17:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 17:59 mbroz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-08 21:47 wysochanski
2008-04-08 21:38 wysochanski
2008-04-02 19:30 wysochanski
2008-04-02 13:08 wysochanski
2007-05-15 13:01 mbroz
2006-10-13 13:22 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070628175935.7684.qmail@sourceware.org \
    --to=mbroz@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).