Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migratepv-Commad

Status
Not open for further replies.

AIX5L

Technical User
Jul 27, 2001
228
CH
Hi all Experts


I have hdisk2 whith datavg, hdisk3 with testvg, who can i move all the lvs from both ( datavg,testvg ) to the hdisk5.

oslevel AIX 4.3.3.0 ML9

Can i use migratepv
Must be the Disks be in the same Volumegroup to move data with migratepv ?

Thanks
 
Yes, you can use migratepv to move the lvs from one hdisk to another, but the new disk must be part of the same volume also.

Another command you might want to consider is cplv.

when using any of the migrate commands (migratepv, migratelp), mirrors are created, then the lvs are resynchronized and then the orginal lvs are removed. You will also need to reassign the dump device using sysdumpdev when using the migratepv.

To avoid this, you can use the cplv, although the new hdisk will also need to be a part of the volume group and your limited to copying each lv one by one.

Can anyone else add any more info?

Hope this helps. Regards,
Chuck

chuck.spilman@nokia.com
 

And what volume group is hdisk5 in?

To copy the contents of logical volume fslv03 to a new logical volume in volume group vg02, enter:

cplv -v vg02
fslv03

Migratepv must have All physical volumes within the same
volume group.

Or back it up , create lvs, and restore it in whatever volume group hdisk5 will be in....
 
AIX5L,

To avoid using cplv (which does span filesystems as Aixqueen so rightly said) and hacking /etc/filesystems to add in the filesystem stanza, you could do an interactive copy.

i.e. on hdisk5

create a filesystem called transfer, mount it up...

cd into the source directory :

find . -print |backup -ivf - |(cd /transfer; restore -xf -)

This will backup and restore the filesystem interactively. Then change the mount points so that /transfer is the original filesystem name.

Simple. You could also use cpio:

i.e.

find . -print |cpio -pudvm /transfer

Cheers

PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top