Operating System - HP-UX
1834646 Members
2503 Online
110069 Solutions
New Discussion

what am I missing on PVMOVE ?

 
SOLVED
Go to solution
Mel Burslan
Honored Contributor

what am I missing on PVMOVE ?

situation :
vg01 has 2 PVGs named PVGINT and PVGARY
PVGARRY has 11 disks (luns)
PVGRAID has 6 disks (luns)

lvol1 is curently residing on one PVGRAID lun and it is not distributed.

I want to make it distributed and spread across the 11 disks (luns) on my PVGARRY

the steps I have taken

lvchange -s g -D f /dev/vg01/lvol1

when I do an lvdisplay, it showed up as

Allocation PVG-strict/partially-distributed

(-D y failed hence I had to use -D f to force it)

after this

pvmove -n /dev/vg01/lvol1 /dev/dsk/c36t1d0 PVGARRY

at this point, my expectancy was to find my lvol1 spread across all 11 drives in PVGARRY but instead I found it residing on a single lun, namely the first lun in the PVG.

What did I miss here ? I am sure it is very simple and stupid but it is friday late afternoon and my brain stopped.

Thanks for all help in advance.
________________________________
UNIX because I majored in cryptology...
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: what am I missing on PVMOVE ?

pvmove did exactly what you told it. It moved the stuff from /dev/vg01/lvol1 to /dev/dsk/c36t1d0.

If you look at the pvmove man page it allow you specify the destination physical volume OR the destination PVG. You specified BOTH so I have a feeling it took the first thing it saw, /dev/dsk/c36t1d0.

What you probably should have done is:

# pvmove -n /dev/vg01/lvol1 PVGARRY

Since it is currently on a disk in the PVGARRY PVG you may need to:

# lvchange -D n /dev/vg01/lvol1
# pvmove -n /dev/vg01/lvol1 PVGRAID
to get it off of the PVGARRAY device.

Then try:

# lvchange -D y /dev/vg01/lvol1
(or use -D f if you have to, I guess)
# pvmove -n /dev/vg01/lvol1 PVGARRY

I don't guarantee that that will do what you need, but I think it may.

Good luck.
Mel Burslan
Honored Contributor

Re: what am I missing on PVMOVE ?

Patrick,

Actually I was following the man page instructions verbatim.

it says (in syntax section)

pvmove -n lvol_name source_pv [dest_pv|destpvg]

my source_pv for lvol1 was dev/vg01/lvol1 and as a destination I have the PVGARRY which is the pvg of all luns/volumes in the new disk array.

This is what's puzzling me.

Thanks for your quick response by the way.
________________________________
UNIX because I majored in cryptology...
Sridhar Bhaskarla
Honored Contributor

Re: what am I missing on PVMOVE ?

Mel,

I don't think pvmove can actually do the "distribution" for you.

On the other hand, if you extend the logical volume to a bigger size, that portion will be distributed.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Mel Burslan
Honored Contributor

Re: what am I missing on PVMOVE ?

I was hoping this will help me distribute the volume while relocationg on the new storage space, I could take care of this.

is there and tested and tru method to accomplish this distribution without taking the volume offline and recreating it ?

Thanks for all the info again. Now I need to go home and walk my dog before starting my next round of work later tonight.

Cheers.
________________________________
UNIX because I majored in cryptology...
Bill Hassell
Honored Contributor
Solution

Re: what am I missing on PVMOVE ?

pvmove only moves physical extents sequentially for an entire disk or for an entire lvol. There is no way to use pvmove to distribute physical extents. A distributed lvol must be created, either by extending the lvol one PE at a time, or by using -D or -i/-I options to lvcreate. If pvmove had an option for number of PE's to move, then you could accomplish this on live data.


Bill Hassell, sysadmin