linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvmove: moving a mirror logical volume not supported?
@ 2006-09-06  9:14 Jens Wilke
  2006-09-06 16:19 ` Alasdair G Kergon
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Wilke @ 2006-09-06  9:14 UTC (permalink / raw)
  To: linux-lvm

Hello!

When trying to do a pvmove on a mirrored logical volume
I get the message "No data to move..."

pvmove /dev/dasdx1
  Skipping mirror LV m1m
  Skipping mirror LV m1m_mlog
  Skipping mirror image LV m1m_mimage_0
  Skipping mirror image LV m1m_mimage_1
  No data to move for main

Looking in the pvmove code reveals that mirror lvs are
intentionally skipped:

--snip--
		if (lv->status & MIRRORED) {
			log_print("Skipping mirror LV %s", lv->name);
			continue;
		}
		if (lv->status & MIRROR_LOG) {
			log_print("Skipping mirror log LV %s", lv->name);
			continue;
		}
		if (lv->status & MIRROR_IMAGE) {
			log_print("Skipping mirror image LV %s", lv->name);
			continue;
		}
--snip--

What is the reason for this?

Best,

Jens

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

* Re: [linux-lvm] pvmove: moving a mirror logical volume not supported?
  2006-09-06  9:14 [linux-lvm] pvmove: moving a mirror logical volume not supported? Jens Wilke
@ 2006-09-06 16:19 ` Alasdair G Kergon
  2006-09-07 10:47   ` Morten Torstensen
  2006-09-07 15:35   ` Jens Wilke
  0 siblings, 2 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2006-09-06 16:19 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Sep 06, 2006 at 11:14:13AM +0200, Jens Wilke wrote:
> What is the reason for this?

No code to do this has yet been written.
There should be no fundamental problems with doing it.

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] pvmove: moving a mirror logical volume not supported?
  2006-09-06 16:19 ` Alasdair G Kergon
@ 2006-09-07 10:47   ` Morten Torstensen
  2006-09-07 15:35   ` Jens Wilke
  1 sibling, 0 replies; 4+ messages in thread
From: Morten Torstensen @ 2006-09-07 10:47 UTC (permalink / raw)
  To: LVM general discussion and development

Alasdair G Kergon wrote:
> On Wed, Sep 06, 2006 at 11:14:13AM +0200, Jens Wilke wrote:
>> What is the reason for this?
> 
> No code to do this has yet been written.
> There should be no fundamental problems with doing it.

pvmove is a wrong approach to the problem too, imo. PVs are just storage devices 
for a VG. By moving LVs (or the PEs that the LV resides on), you accomplish the 
same. When there are no PE in use on a PV, it is easy enough to reduce the VG to 
remove the PV.

Like in this scenario when you want to move a VG from an internal disk to, let's 
say SAN volume (with pseudo-commands):

Assuming VG is pn /dev/scsi and new disk is /dev/sandisk.

# extendvg myvg /dev/sandisk
# lvmirror myvg copies=1 strict=1

(one mirror, allocate strict so copies are on different PVs)

Now check that LVs are in sync and that all is OK with the new disk...

# lvmirror myvg copies=0 remove=/dev/scsi
# reducevg myvg /dev/scsi

This strategy would assume that mirroring is done in PE/LE mapping levels.

I have no idea if Linux LVM mirroring supports this. If anyone have links to 
good LVM docs for the mirroring features that will come with LVM in RHEL5 I 
would appreciate it.


-- 

//Morten Torstensen
//Email: morten@mortent.org
//IM: Cartoon@jabber.no morten.torstensen@gmail.com

And if it turns out that there is a God, I don't believe that he is evil.
The worst that can be said is that he's an underachiever.

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

* Re: [linux-lvm] pvmove: moving a mirror logical volume not supported?
  2006-09-06 16:19 ` Alasdair G Kergon
  2006-09-07 10:47   ` Morten Torstensen
@ 2006-09-07 15:35   ` Jens Wilke
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Wilke @ 2006-09-07 15:35 UTC (permalink / raw)
  To: linux-lvm; +Cc: Alasdair G Kergon

On Wednesday 06 September 2006 18:19, Alasdair G Kergon wrote:
> On Wed, Sep 06, 2006 at 11:14:13AM +0200, Jens Wilke wrote:
> > What is the reason for this?
>
> No code to do this has yet been written.
> There should be no fundamental problems with doing it.

pvmove does alreay something usefull if the skip on the mirror image
is removed.

Problem is, that this is not fool proof because the allocation contraints
for a mirror need to be checked to maintain redundance.

Looking on the allocator and looking on lvconvert, I think, doing it right
will be a very ambitious task, or is my thinking wrong?

Does it make sense to support "simple cases" of moving mirror images 
for the case that we have a source and a target specified and the 
target is empty or does not contain other images of the same mirror?

On the other hand it is also possible to do a 
lvconvert -m0; pvmove; lvconvert -m1

Best,

Jens

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

end of thread, other threads:[~2006-09-07 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06  9:14 [linux-lvm] pvmove: moving a mirror logical volume not supported? Jens Wilke
2006-09-06 16:19 ` Alasdair G Kergon
2006-09-07 10:47   ` Morten Torstensen
2006-09-07 15:35   ` Jens Wilke

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 NNTP newsgroup(s).