Operating System - HP-UX
1831939 Members
3083 Online
110032 Solutions
New Discussion

moving disk from one vg to another vg

 
James Ellis_1
Super Advisor

moving disk from one vg to another vg

We need to upgrade to Oracle 9i. Not enough space in the oracle filesystem (vg02), but we got space in another vg (vg01).

I am pretty sure that to move a disk to vg02 we will have to rebuilt the vg where the disk came from. Is there another way to do this? I don't find a whole lot of info on this in the forum, and will probably have to resort to asking for more space.

Any input appreciated. Thanks.
"In the middle of difficulty lies opportunity" -Einstein
5 REPLIES 5
Bryan D. Quinn
Respected Contributor

Re: moving disk from one vg to another vg

Hello James,

You should be able to do a pvmove, which will move all of the allocated physical extents from one disk to another. That is as long as you have enough free physical extents on the destination disk to accomodate the extents you are moving. Check the man pages for pvmove. With pvmove there would be no need to recreate the vg. Use vgreduce to reduce the physical volume from the volume group after the extents have been moved. Check the man pages for vgreduce also.

VERY IMPORTANT....make sure you have a very very good backup of everything before doing this.

Hope this helps!
-Bryan
Patrick Wallek
Honored Contributor

Re: moving disk from one vg to another vg

Is the disk being used by vg01? There are a couple of ways you can do this.

1) Utilize pvmove to move the extents on the disk you wan to reuse to another disk in VG01. 'man pvmove' for more details.

Once the pvmove is done, you can vgreduce the disk out of vg01, then vgextend it into vg02. You can then do your lvextned, fsadm/extendfs to extend the filesystem.

2) Back up the VG, vgexport it, recreate it without the extra disk, recreate your LVOLs, restore the data. Then vgextend the reused disk into VG02, lvextend, fsadm/extendfs, etc.

I vote for option 1. I have done that several times without any ill effects.
Bruno Ganino
Honored Contributor

Re: moving disk from one vg to another vg

Try command pvmove.
Bruno
Torino (Turin) +2H
G. Vrijhoeven
Honored Contributor

Re: moving disk from one vg to another vg

Hi James,

Before you start moving all extends to an onther disk, make sure that the disk you try to clean is not bigger that MAX PE * PE SIZE in vg02. Use pvmove to empty the disk. vgreduce to delete the disk from vg01 and vgextend to add the disk to vg02.

Regards,

Gideon
SS_6
Valued Contributor

Re: moving disk from one vg to another vg

Yo can not use pvmove if the the disk is in different volume group. Here are few options.
Do Backup for sure.
1. use vgreduce on vg01
2.pvcreate on free disk from vg01
3.vgextend on vg02
4.lvextend on file system

Another way for temporary purpose.
make a link in the file system of vg02 for the file system in vg01
By providing solutions I am helping myself