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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for recommendations moving a logical volume

Status
Not open for further replies.

macvz

Technical User
Feb 9, 2004
5
US
Hello everyone. Brand new to AIX and this board. Just wondering if I could get some guidance on some work that I need to perform shortly. I have an application logical volume called /webfocuslv that was built incorrectly years ago within the rootvg. Could someone share with me the proper steps to follow to move this logical volume out of rootvg and into it's own application volume group on totally different pv's?

What are the pro's & con's of using cp or cpio commands as to using the cplv command?

Thank you.
 
Personally, i'd use cplv, and then chfs to alter the mount point for the filesystem...assuming there's one mounted there now.

if the volume's not too large, you could also tar it up and over from the CLI.

i would use these two b4 i'd use cp.
 
There's an IBM Tech Note about doing exactly what you want to do.

Unfortunately, IBM is playing hide-n-seek with it.

Fortunately, it's available through the Google Cache

- Rod

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

Wish you could view posts with a fixed font? Got Firefox & Greasemonkey? Give yourself the option.
 
Or use migratepv , example (taken from IBMs man page) :

To move physical partitions in logical volume lv02 from hdisk1 to hdisk6, enter:

migratepv -l lv02 hdisk1 hdisk6

Only those physical partitions contained in lv02 are moved from one physical volume to another.
 
migratepv can only be used to migrate lv's in the same volume group, not across different volume groups.

Personally, I would do it this way;
1. Create a new lv in the new volume group, e.g. /webfocuslv_new.
2. Tar up data in /webfocuslv and copy it across to /webfocuslv_new.
3. Unmount /webfocuslv and /webfocuslv_new.
4. Rename /webfocuslv to /webfocuslv_old.
5. Rename /webfocuslv_new to /webfocuslv.
6. Mount /webfocuslv.

This should do it.
 
Ok, Google expired my cache link, so I tracked down the new location on ibm.com.

Technote: Moving a JFS/JFS2 File System to a New Volume Group.

A nice, thorough explanation and procedure for somebody new to AIX or LVM.

- Rod

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

Wish you could view posts with a fixed font? Got Firefox & Greasemonkey? Give yourself the option.
 
Many THANKS to everyone who shared their suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top