Operating System - HP-UX
1820268 Members
2879 Online
109622 Solutions
New Discussion юеВ

Re: pvmove to multiple PV's

 
Terrence
Regular Advisor

pvmove to multiple PV's

If I move the extents from one PV to multiple PV's will pvmove spread the extents over all the new PV's? Or will it start putting them on the first one it chooses and then continue on that one until it fills it up?

pvmove /dev/dsk/c1t0d0 /dev/dsk/c2t0d0 /dev/dsk/c3t0d0

I'm hoping to increase the # of spindles in use to help performance.

I've got existing luns (PV's) in just one raid group. I'd like to use pvmove to move them to luns over two new raid groups so I'll have 16 new (faster) disks with the data as opposed to the current 8.

I need the extents in each current PV spread more or less evenly over two different PV's. (This will also leave plenty of empty space on each new PV for new growth.)
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: pvmove to multiple PV's

If you look at the original PV with pvdisplay (pvdisplay -v /dev/dsk/c1t0d0), you will see that the physical extents are allocated sequentially across the volume. Since pvmove moves "allocated physical extents", I would expect that running pvdisplay on the target volume(s) after the move is going to show the identical layout.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: pvmove to multiple PV's

Hi:

The manpages for 'pvmove' simply note that in the absence of a specific target specification (either by pv_path or by physical volume group), then all physical volumes in the volume group are available as a destination.

I think *you* need to specify your target devices if you want control.

Regards!

...JRF...
Sandman!
Honored Contributor

Re: pvmove to multiple PV's

Not sure if this can be done but you can try setting the "Distributed" allocation policy on the LVOL whose PEs you need to relocate. Afterwards provide the source and destination PVs as arguments to the pvmove(1M) command like you have in your post viz.,

# pvmove /dev/dsk/c1t0d0 /dev/dsk/c2t0d0 /dev/dsk/c3t0d0

~cheers
Sandman!
Honored Contributor

Re: pvmove to multiple PV's

And BTW stop all processes and applications that are using this lvol. Change its allocation policy to distributed followed by unmounting the filesystem. Now you are all set to perform the move using one source PV and two destination PVs. The distributed policy should place each PE on a different PV. Atleast the pvmove(1M) man page hints at that i.e.

"...pvmove selects the proper physical volumes to be used in order to preserve the allocation policies of the logical volume involved."
tkc
Esteemed Contributor

Re: pvmove to multiple PV's

you only specify multiple pv in the pvmove command if the size of either one of the target pv is less than the source pv. otherwise, i dont see there is any option in the pvmove command that can spread the physical extents evenly across the targets.
AwadheshPandey
Honored Contributor

Re: pvmove to multiple PV's

u should use -n option with pvmove
man pvmove
/usr/sbin/pvmove [-A autobackup] [-n lv_path] source_pv_path
[dest_pv_path ... | dest_pvg_name ...]
It's kind of fun to do the impossible
Aneesh Mohan
Honored Contributor

Re: pvmove to multiple PV's

To move all data off disk /dev/dsk/c0t0d0 and relocate it at the destination disks /dev/dsk/c1t0d0,/dev/dsk/c2t0d0 enter:


pvmove /dev/dsk/c0t0d0 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0



To move all data off disk /dev/dsk/c0t0d0 and let LVM transfer the data to available space within the volume group, enter:


pvmove /dev/dsk/c0t0d0

To move the data in logical volume /dev/vg01/lvol1 from the disk /dev/dsk/c0t0d0 to the disk /dev/dsk/c1t0d0, enter

pvmove -n /dev/vg01/lvol1 /dev/dsk/c0t0d0 /dev/dsk/c1t0d0



Aneesh