All of lore.kernel.org
 help / color / mirror / Atom feed
* lvconvert error when converting a linear to a mirror
@ 2009-05-14 18:56 Dave Wysochanski
  2009-05-18 10:48 ` Jun'ichi Nomura
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Wysochanski @ 2009-05-14 18:56 UTC (permalink / raw)
  To: lvm-devel

I keep hitting the below error path when using lvconvert on a linear
volume that is spread across multiple PVs.

	/*
         * FIXME This check used to precede mirror->mirror conversion
	 * but didn't affect mirror->linear or linear->mirror. I do
	 * not understand what is its intention, in fact.
	 */
	if (dm_list_size(&lv->segments) != 1) {
		log_error("Logical volume %s has multiple "
			  "mirror segments.", lv->name);
		return 0;
	}

I created the linear volume by using PE ranges as follows:
# tools/lvm lvcreate -L 64M -n lv1 vg1 /dev/loop0:0-3 /dev/loop1:0-7 /dev/loop2:0-3

The lvconvert command I'm using is:
# tools/lvm lvconvert -m1 vg1/lv1 
  Logical volume lv1 has multiple mirror segments.

I'm not that familiar with lvconvert code, but looking through it
quickly, it looks like it should handle this case ok.  I removed the
above check and the mirror seemed to be created fine.  Is this check
there for some other reason though?  The comment above indicates it is
not clear to at least one other person.  If we are checking mirror
segments, perhaps we should add in a lv->MIRRORED flag check as well?

NOTE: I hit this as a side issue so I don't want to get sidetracked
indefinitely but figured it was worth a mention.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-19 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 18:56 lvconvert error when converting a linear to a mirror Dave Wysochanski
2009-05-18 10:48 ` Jun'ichi Nomura
2009-05-19  6:35   ` [PATCH] Re: [lvm-devel] " Petr Rockai
2009-05-19  8:01     ` Milan Broz
2009-05-19 15:50     ` Dave Wysochanski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.