Operating System - HP-UX
1836607 Members
1822 Online
110102 Solutions
New Discussion

Need to move Oracle Software to another VG

 
SOLVED
Go to solution
Gulam Mohiuddin
Regular Advisor

Need to move Oracle Software to another VG

I have two disks in our system one in vg00 and another in vg01.

I have installed Oracle9i software on vg01.
Now, I need to move Oracle9i from logical volume /dev/vg01/lvol01 in VG01 to VG00.

After that I need to remove VG01 or create vg01 on the same disk where is VG00.

Also, is it possible to move Volume groups to different disk?

# strings /etc/lvmtab
/dev/vg00
en0QAQ
/dev/dsk/c0t6d0
/dev/vg01
en0QAZ
/dev/dsk/c0t5d0

Thanks,

Gulam.
Everyday Learning.
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: Need to move Oracle Software to another VG


Before you start , back up the binaries to tape. Remove the tape so you can't accidently erase it.

Its usually not a great idea to have anything but the OS stuff in vg00. Thats just normal practice.

The general procedure would be:

vgexport -m /etc/lvmconf/vg01 -s /dev/vg01

vgreduce /dev/vg01 /dev/dsk/c0t5d0

create a new vg or extend vg00 to include disk /dev/dsk/c0t5d0.

Then:

vgexport -m /etc/lvmconf/vg00 -s /dev/vg00

vgimport -m /dev/lvmconf/vg00.map -s /dev/vg00

That should import all lvm structues.

Its important to have the backup in case you make a mistake.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Robert-Jan Goossens
Honored Contributor

Re: Need to move Oracle Software to another VG

Hi,

You should have enough space left on you "root" disk inside vg00

# lvcreate -L 8000 -n lvol9 /dev/vg00
change the size and the name if you like :-)
# newfs -F vxfs /dev/vg00/rlvol9
# mount /dev/vg00/lvol9 /mnt
# cd /orahome9i
# find . | cpio -pcmudv /mnt
# cd /
# umount /orahome9i
change the /etc/fstab to point /orahome9i to the new lvol.
# umount /mnt
# mount -a
vgexport vg01 and add the disk to vg00 with a vgextend.

Best regards,
Robert-Jan
twang
Honored Contributor

Re: Need to move Oracle Software to another VG

1. mount temp mount point on new lv on vg00
mount /vg00/lvoracle /oramove
2. copy all files on /orahome9i
cp -r /orahome9i/* /oramove
3. unmount /orahome9i
umount /orahome9i
4. mount new /orahome9i on new lv on vg00:
mount /vg00/lvoracle /orahome9i
5. edit /etc/fstab to reflect the changes on filesystem.