Operating System - HP-UX
1752803 Members
4886 Online
108789 Solutions
New Discussion юеВ

Re: Using LVM to migrate data for Oracle

 
SOLVED
Go to solution
Vpro
Occasional Advisor

Using LVM to migrate data for Oracle

Hi

We have a HP-UX server with oracle8 database hosted on it with SAN storage coming from CLARiiON. We are planning a tech refresh and wanto to remove the CLARiiON storage and migrate the data to NetApp storage. Our requirement is for online data copy with downtime only for cuting over.
We plan to use LVM based mirroring for this purpose
Any pointers on this would be helpful, how we can achieve this?


7 REPLIES 7
Tim Nelson
Honored Contributor

Re: Using LVM to migrate data for Oracle

I have done this many times in the past for storage migrations and have never had any issues.

present equally sized luns from new array
add to volume group
extend mirror
reduce old from vg
remove old from server
cleanup old device paths.

there will be io contention while the mirror sync is in process, but I had never had any end user complaints.
schedule for off peak usage hours.

Dave Johnson_1
Super Advisor

Re: Using LVM to migrate data for Oracle

It is my understanding that NetApp storage is an NFS mount to UNIX. If you cannot present LUNs of the same size and quantity you already have your database on, you cannot use mirroring to get it done. In that case you would have to shutdown Oracle, copy the files, probably remount the NetApp storage in the same place you have it today, then you can start up Oracle. If the path changes at all, you will have to rename all the data file path names and start up Oracle with some switches I do not remember but have to do with creating a new control file and resetting log files.
Vpro
Occasional Advisor

Re: Using LVM to migrate data for Oracle

Hi Tim,

If you can provide any documentation for this process then that would be great.....for this process the only requirement would be disk of the same size....
I just want to be sure on the process so that I dont go wrong for database especially.
Tim Nelson
Honored Contributor
Solution

Re: Using LVM to migrate data for Oracle

details for using pvmove of 1 lun in 1 vg.. repeat for your installation (substitute generically named devices and vgnames with your specifics)

pvmove basically mirrors each extent and then reduces the old extent but acts on the entire disk device vs lvextend/lvreduce which only acts on lvols.


create lun of equal size on new disk array and present to server ( cannot give you instructions for this)

on hpux server:
ioscan (to scan for new storage)
insf -e (to create device files for new storage)
ioscan -kfnC disk (to identify new storage)
pvcreate /dev/rdsk/cxtxdx (device file of new storage)
vgextend /dev/vgname /dev/dsk/cxtxdx (add to vg)
pvmove /dev/dsk/old_lun /dev/dsk/new_lun
or
lvexend -m 1 /dev/vgname/lvolx /dev/dsk/new_lun
lvreduce -m 0 /dev/vgname/lvolx /dev/dsk/old_lun
(repeat lvextend/lvreduce for each lvol)

when complete
vgreduce /dev/dsk/old_lun

unpresent old lun
rmsf -H HW_PATH_OF_OLD_LUN (cleans up old device file)

repeat for each

for best results so you know what you are doing.

add lun from old array and create a new vg with it, add lun from new array and practice the above procedures. understand what you are doing before you do it ;)

best of luck.
Viktor Balogh
Honored Contributor

Re: Using LVM to migrate data for Oracle

@Dave:

>It is my understanding that NetApp storage is an NFS mount to UNIX.

Not exactly. Netapp supports several protocols for storage provisioning. It's name is mostly associated with file-based protocols like NFS or CIFS, but keep in mind that it supports also block-based storage provisioning over FC or iSCSI.
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: Using LVM to migrate data for Oracle

Vpro,

As an addition to Tim's procedure: if you have a clustered environment with LVM, don't forget to vgexport and vgimport the VG on the inactive node.

Regards,
Viktor
****
Unix operates with beer.
Vpro
Occasional Advisor

Re: Using LVM to migrate data for Oracle

Thanks guys for your valuable inputs....will update once the migration are complete.

Regards