public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: prajnoha@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW tools/lvconvert.c
Date: Fri, 30 Mar 2012 08:58:00 -0000	[thread overview]
Message-ID: <20120330085803.6643.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2012-03-30 08:58:02

Modified files:
	.              : WHATS_NEW 
	tools          : lvconvert.c 

Log message:
	Detect VG name being part of the LV name in lvconvert --splitmirrors -n.
	
	Before:
	devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one
	Internal error: LV name vg/splitted_one has invalid form.
	Intermediate VG metadata write failed.
	
	After:
	devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one
	Logical volume mirrored_one converted.
	
	devel/~ # lvconvert --splitmirrors 1 -n abc/splitted_one vg/mirrored_one
	Please use a single volume group name ("vg" or "abc")
	Run `lvconvert --help' for more information.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2372&r2=1.2373
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.188&r2=1.189

--- LVM2/WHATS_NEW	2012/03/27 15:53:45	1.2372
+++ LVM2/WHATS_NEW	2012/03/30 08:58:02	1.2373
@@ -1,5 +1,6 @@
 Version 2.02.96 - 
 ================================
+  Detect VG name being part of the LV name in lvconvert --splitmirrors -n.
   Fix exclusive lvchange running from other node. (2.02.89)
   Add 'vgscan --cache' functionality for consistency with 'pvscan --cache'.
   Keep exclusive activation in pvmove if LV is already active.
--- LVM2/tools/lvconvert.c	2012/03/01 21:14:43	1.188
+++ LVM2/tools/lvconvert.c	2012/03/30 08:58:02	1.189
@@ -173,9 +173,19 @@
 		}
 
 		lp->lv_split_name = arg_value(cmd, name_ARG);
-		if (lp->lv_split_name &&
-		    !apply_lvname_restrictions(lp->lv_split_name))
-			return_0;
+		if (lp->lv_split_name) {
+			if (strchr(lp->lv_split_name, '/')) {
+				if (!(lp->vg_name = extract_vgname(cmd, lp->lv_split_name)))
+					return_0;
+
+				/* Strip VG from lv_split_name */
+				if ((tmp_str = strrchr(lp->lv_split_name, '/')))
+					lp->lv_split_name = tmp_str + 1;
+			}
+
+			if (!apply_lvname_restrictions(lp->lv_split_name))
+				return_0;
+		}
 
 		lp->keep_mimages = 1;
 		lp->mirrors = arg_uint_value(cmd, splitmirrors_ARG, 0);


             reply	other threads:[~2012-03-30  8:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30  8:58 prajnoha [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-22 17:18 jbrassow
2011-06-01 12:24 prajnoha
2011-01-05 23:18 jbrassow
2011-01-05 20:02 jbrassow
2010-07-30 17:50 taka
2010-07-06 17:02 jbrassow
2010-04-26 18:32 agk
2010-02-05 21:49 jbrassow
2009-10-23  1:24 agk
2009-06-26  9:04 agk
2009-06-15 13:43 mbroz
2009-06-15 12:09 mbroz
2008-06-26 21:38 agk
2008-04-18 12:50 agk
2008-02-12 13:29 agk
2008-02-12 13:26 agk
2008-01-14 21:11 agk
2007-08-22 20:03 agk
2007-08-22 19:32 agk
2007-08-10 13:33 wysochanski
2005-08-15 14:10 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=20120330085803.6643.qmail@sourceware.org \
    --to=prajnoha@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).