1833454 Members
3191 Online
110052 Solutions
New Discussion

pvmove question

 
yc_2
Regular Advisor

pvmove question

Hi,

If the lvol is span across two disks or more, can I move this lvol to a single disk (the size is sufficient for the whole lvol) using pvmove. If so, what is th syntax of the command ?


YC
4 REPLIES 4
Scott Van Kalken
Esteemed Contributor

Re: pvmove question

The man page isn't 100% clear on whether you can do this if the lvol spans more than 1 disk.

I think it should work, but I'd be more tempted to just back up the LV, remove it, and re-create it.

Michael Tully
Honored Contributor

Re: pvmove question

Hi YC,

To move a logical volume is quite easy and the man page does sort of say how.

First move the lvol from disk 1 to new disk

# pvmove -n /dev/vg01/lvol2 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0

and then move the rest of the lvol from disk 2 to new disk.

# pvmove -n /dev/vg01/lvol2 /dev/dsk/c1t0d1 /dev/dsk/c2t0d0

Assuming the logical volume you wish to move is 'lvol2' and the disk is /dev/dsk/c2t0d0
You just need to do it in two passes.

HTH
Michael
Anyone for a Mutiny ?
S.K. Chan
Honored Contributor

Re: pvmove question

Yes you can do this. A few things to watchout for.. I'm assuming this is not a mirrorred lvol, it's not activated in shared mode and it's not stripped. If any of the above is true, it won't work. Now the steps ..
say vg01 got lvol2 which spans c2t2d0 and c2t3d0 in that order. And you want to move all of lvol2 to c2t4d0 (VERY IMPORTANT.. c2t4d0 is part of vg01 and has enough PEs). Another thing I need to caution here, even though you can do an active pvmove I strongly recommend backing up the data in lvol2 first before you do this.
# pvmove -n /dev/vg01/lvol2 /dev/dsk/c2t2d0 /dev/dsk/c2t4d0
==> moving first "chunk" of extents from c2t2d0 to c2t4d0
# pvmove -n /dev/vg01/lvol2 /dev/dsk/c2t3d0 /dev/dsk/c2t4d0
==> moving the remaining "chunk" of extents from c2t3d0 to c2t4d0
The pvmove operation may take a while, so be patient.
Fragon
Trusted Contributor

Re: pvmove question

Hi,of course can! But one by one. For detail information about pvmove and how to use, the man page is just ok!

-Live as you wish-
Zhou