System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Move data from one PV to another

 
Rajesh R_2
Frequent Advisor

Move data from one PV to another

Hi,

I had added a new pv to one of the VG, and then extended the filesystem. This filesystem contains the Oracle database dbf file. Now, I want to delete that particular pv due to some issue. When I do a pvdisplay -v, I see most of the PE in that PV is occupied. After I extended the filesystem, the database tablespace was not extended. So, I feel there would not be any database related data on that. But, I am not sure.

Can anyone suggest me the best way to remove that particular pv without corrupting the database or the filesystem.

Thanks & Best Regards
Rajesh
4 REPLIES
The Tiger
Advisor

Re: Move data from one PV to another

You can move the PEs using pvmove command.

Use pvmove and move all PEs of new PV to the existing HDDs or else add a new HDD and move it to the new HDD.

And after that you can remove the new PV from the VG.
Avinash20
Honored Contributor

Re: Move data from one PV to another

Same thread
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1306218
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
The Tiger
Advisor

Re: Move data from one PV to another

Eg:

In order to move all PEs from C0t1d0 to the PVs c0t2d0 and c0t3d0

#pvmove /dev/dks/c0t1d0 /dev/dsk/c0t2d0 /dev/dsk/c0t3d0

and remove the PV from VG using vgreduce
sujit kumar singh
Honored Contributor

Re: Move data from one PV to another

hello Rajesh,


pvmove is a command that can surely serve the purpose but once if this gets interrupted in between it can lead the source and the destination both in an inconsistent state for sure and the data will surely be gone.

Make sure that u have the full backup and a reliable one for that filesystem before u can give a try to pvmove.

As this conatins dbf files, i will suggest u to do a tape backup using fbackup /tar etc and umount the filesys,remove old LV, create new LV using lvrecreate , mount the LV and restore the data.


Mkae sure that u have a reliable backup before u do a lvrmove and recreate the LV.


that is anyway a safe way of doing that.


Regards
sujit