Operating System - HP-UX
1829122 Members
1786 Online
109986 Solutions
New Discussion

moving from disk to disk in same vg

 
SOLVED
Go to solution
Fred Ruffet
Honored Contributor

moving from disk to disk in same vg

I have an old server using old disks. Old server is slow. Old disks are small. Old hardware is not reliable.

I had an alert on a VG using 12 disks. I want to move all data (no mirror) from this disk to a safe one (or considered as so). I have space on the VG itself to take data from problem disk to safe one. I would then use vgreduce, and take this PV out. Problem is : how can I know what data is on a specific PV ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
5 REPLIES 5
Slawomir Gora
Honored Contributor

Re: moving from disk to disk in same vg

Hi,

use lvdisplay -v to check distribution of logical volumens per PV

ex:

lvdisplay -v /dev/vg00/lvol2 | more


RAC_1
Honored Contributor
Solution

Re: moving from disk to disk in same vg

You can know which lvs are on that pv. Use lvdisplay on all lvs in that vg, and check which list problematic disk as a part of them.

If you have enough space in vg, you can do pvmove. Before doing anything, it would be better to back the VG up.

Anil
There is no substitute to HARDWORK
Patrick Wallek
Honored Contributor

Re: moving from disk to disk in same vg

If you want to see exactly what is on a pv, use the 'pvdisplay -v /dev/dsk/c?t?d?' command.

This will show all LVs on that particular PV.

If you want to move EVERYTHING from one PV to another PV in the same VG, use the pvmove command. 'man pvmove' for more information.
bhavin asokan
Honored Contributor

Re: moving from disk to disk in same vg

hi,

first findout the disk contains to which logical volumes by pvdisplay
#pvdisplay -v /dev/dsk/c0t3d0 |pg


Suppose you want to move the data in a logical volume, /dev/vg01/
markets, from the disk /dev/dsk/c0t3d0 to the disk /dev/dsk/c0t4d0.
Note that when you issue the command, you must specify a specific
logical volume on the source disk with the -n flag. You must also
specify the source disk first in the command line. For example,
# pvmove -n /dev/vg01/markets /dev/dsk/c0t3d0 /dev/dsk/c0t4d0

regds,
Fred Ruffet
Honored Contributor

Re: moving from disk to disk in same vg

pvmove was my solution :)

I already used "lvdisplay -v" and moved LVs entirely on that PV by a re-creation. But I had a LV partially on that PV and too big for re-creation.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)