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

Moving lvols from Rootvg to newvg

Status
Not open for further replies.

vila30

Technical User
Dec 7, 2005
11
CA
Hi,
We have some user filesystems in rootvg,which we want to move to new volumegroup and cleanup rootvvg .what's the best way to do and pls provide procedure.We have aix5.3 ml3

Thank you all.
vila
 
This may help

1. Create a new LV on the desired VG..
2. Create a new JFS on the newly created LV
3. Mount the new JFS
#mount /newJFS
4. Type the following to copy the data from the old JFS to the newly created JFS
#cp –R –p /oldJFS /newJFS
5. Once that has completed confirm that the data in the newly created JFS is the same as the old JFS.
6. Unmount the oldJFS
7. Remove the oldJFS
8. Unmount the newJFS
9. Via “smit lv” change the name of the newLV to the name of the oldLV
10. Then via “smit jfs” change the mount point for the newJFS towhat the oldJFS was .i.e if it was /usr/dump and the newJFS is currently /temp/backup then change /temp/backup to /usr/dump.
11. Change the permission on the mount point to let all in
12. #chmod 777 /usr/dump (using the example above)
13. Mount the newJFS which by using the example above is /usr/dump
#mount /usr/dump
14. Go into the newJFS (/usr/dump) and check the data is OK and correct.
15. You should be all done now.
 
That's a lot of steps when all you need is cplv.
 
indeed, cplv -v <targetvolumegroup> logicalvolume, there's no more to it.FS must be unmounted first before you can issue the cplv

rgds,

R.
 
Hi R,
Can you elaborate on cplv steps.I take it that i create new vg.and then
cplv -v newvg old_lvname..what about mount point..
Thx
vila
 
1.first : make sure you have a jfs/jfs2 log in your targetvg

if you don't :

mklv -y mylog -t jfslog targetvg 1 ( this is for jfs)

2.format the log for usage (only if you had to create a new one):

logform /dev/mylog

->logform: destroy /dev/mylog (y)?y

3.umount your filesystem

4.change your filesystem to use the new lv

chfs -a dev=/dev/newlogicalvolume /filesystem

5.change your filesystem to use the newly created log ( or an existing log from the targetvg)

chfs -a log=/dev/mylog /filesystem

6. mount /filesystem


rgds,

R.
 
if you get the following message :
mount: 0506-351 The log device and fs device must be in the same volume group.

change your fs in /etc/filesystems to use the correct log

rgds,

R.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top