Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] How can I restripe LVs on addition of extra PVs?
@ 2004-10-14  1:12 Daniel .
  2004-10-14  5:49 ` Clint Byrum
  2004-10-14 21:27 ` Markus Baertschi
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel . @ 2004-10-14  1:12 UTC (permalink / raw)
  To: linux-lvm

Hi, 
 
[I'm only familiar with LVM1, so that's what I'm referring to in the rest of the mail.  I probably could move to LVM2 if it solves my problems.] 
 
I'm planning on using LVM to create LVs striped across multiple PVs (which, incidentally, are RAID 1 mirrorred partitions). 
In the future I will need to add extra PVs to the VG and extend the LVs. 
 
My question is 'what happens to the striping of the LV in this situation?' 
I could only find very limited info in man/archives/web.  From it I inferred that LVM will not automatically restripe the LV, and it doesn't seem easy to do manually.   
Indeed, the only place you can set the number of PVs to stripe the LV over is in lvcreate, and it seems I would need to increase that by the number of extra PVs. 
Some emails in the archive suggest that you can do a pvmove specifying the actual extents to move to the new PV.  It shows an example of going from 1 PV to 2 
PVs which is easy compared to going from n PVs to (n+m) PVs.  Though if I could change the number of PVs that the LV is striped over maybe I could repeatedly 
pvmove each PV with no args until it approximated a restriping of each LV... sounds a bit dodgy to me. 
 
Does anyone have advice on how to restripe?  Or alternative setups that don't require restriping? 
 
Thanks 
Daniel 
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <mailman.10762.1097732995.3231.linux-lvm@redhat.com>]
* Re: [linux-lvm] How can I restripe LVs on addition of extra PVs?
@ 2004-10-14 20:10 Daniel .
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel . @ 2004-10-14 20:10 UTC (permalink / raw)
  To: linux-lvm

 
----- Original Message ----- 
From: AJ Lewis <alewis@redhat.com> 
To: LVM general discussion and development <linux-lvm@redhat.com> 
Subject: Re: [linux-lvm] How can I restripe LVs on addition of extra PVs? 
Date: 14 Oct 2004 08:52:36 -0500 
 
>  
> Clint Byrum <cbyrum@spamaps.org> writes: 
>  
> > On Wednesday, October 13, 2004, at 06:12 PM, Daniel . wrote: 
> >  
> > > Hi, 
> > > 
> > > [I'm only familiar with LVM1, so that's what I'm referring to in the 
> > > rest of the mail.  I probably could move to LVM2 if it solves my 
> > > problems.] 
> > > 
> > > I'm planning on using LVM to create LVs striped across multiple PVs 
> > > (which, incidentally, are RAID 1 mirrorred partitions). 
> > > In the future I will need to add extra PVs to the VG and extend the 
> > > LVs. 
> > > 
> >  
> > This just came up in #lvm on freenode today. I don't think this is at 
> > all possible with LVM1. Once the striping is done for an LV, that LV 
> > cannot be extended past the physical extents that were allocated at 
> > that time. 
> >  
> > However, with LVM2, you could write a script to do this by manually 
> > running pvmove over and over, doing something like "pvmove dev:1-8 
> > otherdev;pvmove otherdev:1-8 dev;" .. It gets rather complex to figure 
> > this out on the cmdline, but I do believe it can be done and you would 
> > end up with PE's evenly spread out over all PVs. 
> >  
> > Somebody tell me this is wrong and stupid before I try it. ;) 
>  
> One problem I see with doing this is that your LVM metadata is going 
> to get rather large after you've done this.  Because you're mucking 
> with the segments through pvmove, lvm doesn't know that you're trying 
> to convert a stripe set of 2 to a stripe set of 4 or whatever.  I'm 
> not positive, but it seems like this could be a problem. 
 
Can't comment on the metadata issues... 
Being able to change a LV to stripe across a different number of PVs seems a necessity to me, and impossible to do (at least with LVM1). 
 
>  
> Also, remember that stripe size is different then segment size, and 
> segment size is the level at which pvmove manipulates things.  So 
> that's probably not going to do what you want it to. 
 
Though, as I understand it, any extents allocated from within the segments being moved are reallocated according to the allocation policy of the LV to which they 
belong.  So, putting aside the inablity to change the stripe set size, pvmoving repeatedly should end up with the LVs extents allocated roughly evenly over all the PVs 
(maybe all-1 PVs?).  Though the extents will probably be scattered more than striped. 
 
In any event, it all sounds a bit dodgy, especially seen I was going to do the striping with LVM to make management easier. 
It sounds like using EVMS to manage mirroring through md, then striping through md, then sizing through LVM will be less of a headache.  And md allows stripe sizes 
greater than 512KB which I'd prefer. 
 
Thanks for you comments, all. 
 
Daniel 
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [linux-lvm] How can I restripe LVs on addition of extra PVs?
@ 2004-10-14 22:58 Daniel .
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel . @ 2004-10-14 22:58 UTC (permalink / raw)
  To: linux-lvm

 
----- Original Message ----- 
From: Markus Baertschi <markus@markus.org> 
To: LVM general discussion and development <linux-lvm@redhat.com> 
Subject: Re: [linux-lvm] How can I restripe LVs on addition of extra PVs? 
Date: Thu, 14 Oct 2004 23:27:07 +0200 
 
>  
> Daniel . wrote: 
>  
> >Hi,  
> >  
> >[I'm only familiar with LVM1, so that's what I'm referring to in the rest of the mail.  I probably could move to LVM2 if it solves my problems.] 
> > 
> Why do you want to stripe ? 
>  
> If it is for performance you'll have to pay the price in form of inflexibility. If it is for other reasons, do you have to stripe ? 
 
Yep, performance.  It's for a database machine. 
Adding disks will be a very rare occurrence, resizing LVs an uncommon occurrence.  So having LVM just do the sizing of LVs on the striped mirrors is a managment 
advantage. 
It doesn't really sound like LVM is the right tool for doing the striping itself though. 
md can do the striping but apparently it's advised to take everything offline first if the striping is part of a stack of storage systems.  That is a bit inflexible but better than 
what LVM can give me and, like I said, adding disks will be rare. 
 
Cheers 
Daniel 
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

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

end of thread, other threads:[~2004-10-14 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-14  1:12 [linux-lvm] How can I restripe LVs on addition of extra PVs? Daniel .
2004-10-14  5:49 ` Clint Byrum
2004-10-14 21:27 ` Markus Baertschi
     [not found] <mailman.10762.1097732995.3231.linux-lvm@redhat.com>
2004-10-14 13:52 ` AJ Lewis
  -- strict thread matches above, loose matches on Subject: below --
2004-10-14 20:10 Daniel .
2004-10-14 22:58 Daniel .

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox