linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvmove to smaller PVs
@ 2006-04-05 17:34 Fredrik Tolf
  2006-04-05 17:44 ` Alasdair G Kergon
  0 siblings, 1 reply; 7+ messages in thread
From: Fredrik Tolf @ 2006-04-05 17:34 UTC (permalink / raw)
  To: linux-lvm

I'm trying to use pvmove to move data from a 300 GB S-ATA disk onto
four, smaller 120 GB IDE disks. However, pvmove tells me that it cannot
allocate enough contiguous PEs to fit 300 GB, like this:

# pvmove /dev/sde1
  Insufficient contiguous allocatable extents (28617) for logical volume
pvmove0: 71541 required
  Unable to allocate temporary LV for pvmove.

I can, of course, understand that it can't find contiguous PEs
corresponding to 300 GB, but I don't understand why it should need it to
be contiguous. Can pvmove not just divide that storage into three
"partitions", each fitting on one 120 GB disk, and move them? Is there a
way for me to tell it to do so?

I seem to be able to use something like "pvmove /dev/sde1:0-28616" to
tell pvmove manually to do this for me, but this poses a small problem
for me, as not all of the data on the disks I want to move from are
allocated where I know them to be. This particular disk is fully
allocated, so that I know what I could do with that syntax, but is there
really no way to tell pvmove to do this automatically? It just seems
kind of strange to me.

Fredrik Tolf

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

* Re: [linux-lvm] pvmove to smaller PVs
  2006-04-05 17:34 [linux-lvm] pvmove to smaller PVs Fredrik Tolf
@ 2006-04-05 17:44 ` Alasdair G Kergon
  2006-04-05 17:57   ` Matt P
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alasdair G Kergon @ 2006-04-05 17:44 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Apr 05, 2006 at 07:34:18PM +0200, Fredrik Tolf wrote:
> Can pvmove not just divide that storage into three "partitions", 

There's no logic to do that yet.  It can only move complete sets of
contiguous extents.

> Is there a way for me to tell it to do so?

As you found: break up contiguous extents explicitly on
the command line by telling it to move smaller parts that it
can handle.

Use '--alloc anywhere' if you need to move data within a single PV.

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] pvmove to smaller PVs
  2006-04-05 17:44 ` Alasdair G Kergon
@ 2006-04-05 17:57   ` Matt P
  2006-04-05 17:58   ` Fredrik Tolf
  2006-04-27 10:39   ` Dieter Stüken
  2 siblings, 0 replies; 7+ messages in thread
From: Matt P @ 2006-04-05 17:57 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

I'm no expert, mostly just a lurker on this list, but couldn't you SoftRAID
the 4 120GB's together then PV move the 300GB to the logical disk?

On 4/5/06, Alasdair G Kergon <agk@redhat.com> wrote:
>
> On Wed, Apr 05, 2006 at 07:34:18PM +0200, Fredrik Tolf wrote:
> > Can pvmove not just divide that storage into three "partitions",
>
> There's no logic to do that yet.  It can only move complete sets of
> contiguous extents.
>
> > Is there a way for me to tell it to do so?
>
> As you found: break up contiguous extents explicitly on
> the command line by telling it to move smaller parts that it
> can handle.
>
> Use '--alloc anywhere' if you need to move data within a single PV.
>
> Alasdair
> --
> agk@redhat.com
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

[-- Attachment #2: Type: text/html, Size: 1454 bytes --]

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

* Re: [linux-lvm] pvmove to smaller PVs
  2006-04-05 17:44 ` Alasdair G Kergon
  2006-04-05 17:57   ` Matt P
@ 2006-04-05 17:58   ` Fredrik Tolf
  2006-04-05 18:03     ` Alasdair G Kergon
  2006-04-27 10:39   ` Dieter Stüken
  2 siblings, 1 reply; 7+ messages in thread
From: Fredrik Tolf @ 2006-04-05 17:58 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, 2006-04-05 at 18:44 +0100, Alasdair G Kergon wrote:
> On Wed, Apr 05, 2006 at 07:34:18PM +0200, Fredrik Tolf wrote:
> > Can pvmove not just divide that storage into three "partitions", 
> 
> There's no logic to do that yet.  It can only move complete sets of
> contiguous extents.
> 
> > Is there a way for me to tell it to do so?
> 
> As you found: break up contiguous extents explicitly on
> the command line by telling it to move smaller parts that it
> can handle.

I see. I guess I'll just have to do that then. It's not *that* bad,
after all. :)

However, is there a "canonical" way to check where PEs have been
allocated inside PVs? I think I can check /etc/lvm/backup/vgname. I'm
just getting the feeling that that's kind of ugly.

Thanks for your reply!

Fredrik Tolf

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

* Re: [linux-lvm] pvmove to smaller PVs
  2006-04-05 17:58   ` Fredrik Tolf
@ 2006-04-05 18:03     ` Alasdair G Kergon
  2006-04-05 18:30       ` Fredrik Tolf
  0 siblings, 1 reply; 7+ messages in thread
From: Alasdair G Kergon @ 2006-04-05 18:03 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Apr 05, 2006 at 07:58:19PM +0200, Fredrik Tolf wrote:
> However, is there a "canonical" way to check where PEs have been
> allocated inside PVs? 

lvs -o+devices
gives start PEs in parentheses

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] pvmove to smaller PVs
  2006-04-05 18:03     ` Alasdair G Kergon
@ 2006-04-05 18:30       ` Fredrik Tolf
  0 siblings, 0 replies; 7+ messages in thread
From: Fredrik Tolf @ 2006-04-05 18:30 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, 2006-04-05 at 19:03 +0100, Alasdair G Kergon wrote:
> On Wed, Apr 05, 2006 at 07:58:19PM +0200, Fredrik Tolf wrote:
> > However, is there a "canonical" way to check where PEs have been
> > allocated inside PVs? 
> 
> lvs -o+devices
> gives start PEs in parentheses

Oh, cool. Thanks!

Fredrik Tolf

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

* Re: [linux-lvm] pvmove to smaller PVs
  2006-04-05 17:44 ` Alasdair G Kergon
  2006-04-05 17:57   ` Matt P
  2006-04-05 17:58   ` Fredrik Tolf
@ 2006-04-27 10:39   ` Dieter Stüken
  2 siblings, 0 replies; 7+ messages in thread
From: Dieter Stüken @ 2006-04-27 10:39 UTC (permalink / raw)
  To: LVM general discussion and development

Alasdair G Kergon wrote:
> On Wed, Apr 05, 2006 at 07:34:18PM +0200, Fredrik Tolf wrote:
>> Can pvmove not just divide that storage into three "partitions", 
> 
> There's no logic to do that yet.  It can only move complete sets of
> contiguous extents.
> 
>> Is there a way for me to tell it to do so?
> 
> As you found: break up contiguous extents explicitly on
> the command line by telling it to move smaller parts that it
> can handle.

I run into the same problem: I got a hw-raid controller and merged
all my individual disks into a raid5. Thus I got one big PV instead
of several small one. After moving back and forth some lvs, my PV
gets more and more fragmented. Thus I have to instruct pvmove
explicitly which fragments have to move.

The pvmove manpage explains shortly how pvmove works: Segments to
to move are added to a temporary 'pvmove' lv, but it seems lvmove
won't split any source segment into smaller pieces to fit into
any target segment. I may explicitly express source segments
(using :PE-PE), but this also becomes complicated if my source PV
is fragmented, too. Even if I do so, it is not clear to me, how
to express such a fragmented pvmove with a single command. Else
I have to perform lots of single pvmoves and have to wait for each
to become ready?

Dieter.

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

end of thread, other threads:[~2006-04-27 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05 17:34 [linux-lvm] pvmove to smaller PVs Fredrik Tolf
2006-04-05 17:44 ` Alasdair G Kergon
2006-04-05 17:57   ` Matt P
2006-04-05 17:58   ` Fredrik Tolf
2006-04-05 18:03     ` Alasdair G Kergon
2006-04-05 18:30       ` Fredrik Tolf
2006-04-27 10:39   ` Dieter Stüken

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).