Re: migrating a filesystem/lv from one disk to two disks

From: Steve Chandler (schandler@APPLE.COM)
Date: Mon Oct 07 2002 - 14:51:45 EDT


You could use lmigratepp, this will only migrate one pp at a time, and
then write a script to move multiple PP's. This is a second level
command, look in the LVM redbooks for more information. This command is
used by migratepv to move the individual partitions.

steve

Holger.VanKoll@SWISSCOM.COM wrote:

> Hello,
>
> I got a fs (say) called my_fs on lv my_lv thats on hdisk2, 20 LPs, no
> mirroring.
>
> hdisk2 is overloaded, especially with this fs. So I want to migrate 10
> of the 20 LPs to another disk.
>
> hdisk3 and hdisk4 are in the same vg, both have 11 LP free. hdisk4 has
> also much load, so I only want to "stripe" my_fs on hdisk2 and hdisk3.
>
> I cant use migratepv -l my_lv, it always migrates the whole lv.
>
> I could use chlv to set intrapolicy to max and do an reorgvg. That
> however would distribute my_lv on hdisk2 and hdisk3 and hdisk4.
>
> To prevent this, I could use "chpv -a n hdisk4" to prevent further
> pp-allocations to hdisk4.
> That could work, but did anyone ever do this? I am worrying about
> performance. reorgvg needs one free pp (man reorgvg). Does that mean
> it will temporarily mirror every pp on this free pp (11 LP free - 10
> PP to get allocated) ?
>
> I could also use mklvcopy to make a lv copy on hdisk4. Then remove the
> "original" copy on hdisk2. Then mklvcopy -m
> map_file_containing_hdisk2_and_hdisk3 and rmlvcopy my_lv hdisk4. That
> should also work, however, then the whole lv will be copied twice. And
> all I need to do is moving some PP from hdisk2 to hdisk3...
>
> Actually there are much more LP to be moved than 10. I just took this
> small number for explanation. There are 220 PPs at 256MB size to be
> moved; and I must avoid any unnecessary IO.
>
> Do you have any other ideas to move half of an lv to another disk?
> Or did you every try one of my "ideas"?
>
> I looked through the scripts reorgvg and migratepv and I think the key
> to the solution with fewest IO (so, no unnecessary IO) is lmigratepp
> or lmigratelv. Is there any detailed documentation about these
> commands (beside lvm commands redbook)? I cant find out whether the
> mapfile parameter of lmigratelv accepts mapfile with entries that
> (partly) reflect the current allocation of the lv.
>
> I know all this is a poor-mans-stripe, but currently I cant create a
> striped lv and copy ms_fs to it; lack of space and lack of possible
> downtime (umount my_fs).
>
> Regards,
>
> Holger

--
Steve Chandler - Apple Computer
520 744 0410 (Office)
520 907 3969 (mobile)
866 728 2421 (fax)


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:15 EDT