Operating System - HP-UX
1752344 Members
5649 Online
108787 Solutions
New Discussion юеВ

Re: Moving datafiles from non-stripped to stripped logical volumes

 
SOLVED
Go to solution
Srinikalyan
Regular Advisor

Moving datafiles from non-stripped to stripped logical volumes

Hi,
We are in the process of moving the Oracle datafiles from non-stripped logical volumes to stripped volumes. I need to know which will be the best way to do this. If we do just the copy cp and dd command, will that helps in performance and will that the data move as per the stripe unit? Or do we require any Oracle way of re-creating the data files in the new stripped volumes?
Thanks,
Srini
8 REPLIES 8
Tim Nelson
Honored Contributor

Re: Moving datafiles from non-stripped to stripped logical volumes

Without more background info I will assume the following.

You are using LVM and the physical devices are either striped on a disk array or LVM striping is used. You are also using vxfs filesystems and not raw disk.

This that said, simply copy the data or restore from a backup means of your choice(certainly while the application is down).

Using LVM and vxfs you do not have any real control of the data layout.

If you are NOT using LVM and/or vxfs then please fill provide some more specifics.

Srinikalyan
Regular Advisor

Re: Moving datafiles from non-stripped to stripped logical volumes

We are already using the XP array level striping RAID 5 and after further analysis we decided to use LVM striping as well for the Oracle datafiles. Is the cp command the best way to move the files from LVM non-striped to LVM striped logical volumes?
Thanks,
Srini
Jannik
Honored Contributor

Re: Moving datafiles from non-stripped to stripped logical volumes

There are different simple way to do this:

Local copy:
tar cf - * | ( cd /target; tar xfp -)
( cd SOURCEDIR && tar cf - . ) | (cd DESTDIR && tar xvpf - )
find . -print -depth | cpio -pvdum /data/my_data

Remote:
( cd SOURCEDIR && tar cf - . ) | ssh target_address "(cd DESTDIR && tar xvpf - )"

For local copy i would use the find command it seems to be a little bit faster (in some cases).

Links:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=778077
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1115722
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1082336
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1065155
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=81120

This link is fun reading:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=850008
jaton
Hein van den Heuvel
Honored Contributor

Re: Moving datafiles from non-stripped to stripped logical volumes

What HP-UX version? What toools?

dd is the easy way to go, if you can tolerate the down time on that part of the db, no need to shut down oracle or hpux.
Eventually you'll need to tell Oracle where the new datafile lives directly (alter database...), or with smoke and mirrors... soft link from old location.

Speaking of mirroring, with the right tools and lvm command you can potential turn the original LV into a mirror, adding the new LVM striped disks. This will transparently make a copy. You can then reduce or split away the original and have no downtime (but a lot of homework and testing!).

Best i know, you used to be able only to mirror on exetend-based stripes (which may well be optimal), not on 'block striped. But there are patches ( PHCO_36746 ) which can make this happen also, for hpux 11.23.
Carefully read: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1197798

Other topics describe these suggestion in various levels of detail. Google for +lvm +strip +mirror. Toss in 'pvg' or 'split' as needed.


Hope this helps some,
Hein.
John Brooks_1
Advisor

Re: Moving datafiles from non-stripped to stripped logical volumes

another option is to use cpio.
cd olddir
find . -depth -print | cpio newdir

Just keep in mind to if you are planning to change your mount names then you will need to rename your datafiles in Oracle.

You can mount the new striped mount points to a temporary name, copy the data, unmount the old mount points and then remount the new mount using the old name.
Srinikalyan
Regular Advisor

Re: Moving datafiles from non-stripped to stripped logical volumes

Thanks All. Will that the data moves to the disks as per the stripe unit by using all the mentioned methods?
Note:HP-UX version 11i v2
Thanks,
Srini
Tim Nelson
Honored Contributor
Solution

Re: Moving datafiles from non-stripped to stripped logical volumes

>>We are already using the XP array level striping RAID 5 and after further analysis we decided to use LVM striping as well for the Oracle datafiles. Is the cp command the best way to move the files from LVM non-striped to LVM striped logical volumes?


If you are striping a stripe ( I call it plaiding ). Then the stripe size and data layout is controlled by how you created the lvol ( e.g. -i 8,16,64 etc.. )

The method of copy does not matter.

Please post your results, there has been great debate on "plaiding".
In some instances LVM striping an array stripe may disable or hinder the array's ability to optimize prefetch and cache.

In other cases people have experienced benefits.

The current word is "test it in your environment and use what works best for you"

I think it would be great to hear your results.
Srinikalyan
Regular Advisor

Re: Moving datafiles from non-stripped to stripped logical volumes

Thanks Tim and Others.
Surely I will give the updates after the change.

Thanks,
Srini