Operating System - HP-UX
1745901 Members
4562 Online
108723 Solutions
New Discussion юеВ

Re: want to move a filesystem database to a raw-database

 
SOLVED
Go to solution
Deanna Tran_1
Frequent Advisor

want to move a filesystem database to a raw-database

hi all,
currently, I have a filesystem database, and i want to move it to raw-database....Is there an easy way to do so, i don't want to destroy the database...
8 REPLIES 8
Brian Crabtree
Honored Contributor

Re: want to move a filesystem database to a raw-database

I have heard that it is possible to do this by creating the raw devices on the system, and then copying datafiles directly to them with the "dd" command.

By far the easiest way to do this is by exporting your current database, destroying it, recreating it with raw devices, and then reimporting it.

Brian
Deanna Tran_1
Frequent Advisor

Re: want to move a filesystem database to a raw-database

Hi Brian,
Would you give me a little more procedure ?
harry d brown jr
Honored Contributor

Re: want to move a filesystem database to a raw-database


Deanna,

SORRY, but you will can't just move the files to a raw disk and have it work. You will have to export your entire database, create the new table space on the raw disks and do an import.

If you are doing this to gain performance, you might not really see any great benefits. There are people in both camps, and personally I'm for either.

live free or die
harry
Live Free or Die
Bill Hassell
Honored Contributor

Re: want to move a filesystem database to a raw-database

A filesystem contains files and directories, while a raw database places the management of the data comopletely in the hands of the database program. It is impossible to just convert the data in place. That's because only the database program knows where the data bits will be stored.

So the first question is: does your databse program handle a raw database? If not, there's no point in converting. If your program does handle raw data, then it should document very clearly how to convert. Typically it will be called export and import.


Bill Hassell, sysadmin
Andreas D. Skjervold
Honored Contributor

Re: want to move a filesystem database to a raw-database

Hi

The easier solution that I have tried a couple of times is to modify the mount_vxfs options to alter the system caching of the filesystems:

datafiles and redo:
Use mincache=direct,convosync=direct
rbs and temp:
Use mincache=dsync,convosync=dsync

You then get filesystems with "raw" like behavior.

I do not know if the performance boost is significant.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Brian Crabtree
Honored Contributor
Solution

Re: want to move a filesystem database to a raw-database

Deanna,

Look at note 146384.1 on metalink. It is possible to move the database over from a cooked filesystem to a raw filesystem, however it is not an easy task, and shouldn't be done lightly. Overall, you are not going to see a good performance increase over cooked filesystem when you consider the added responsiblity of dealing with raw partitions.

Brian
A. Clay Stephenson
Acclaimed Contributor

Re: want to move a filesystem database to a raw-database

Actually it's quite easy to do and you don't have to change anything at the oracle level. You are really not going to see any improvements over the OnlineJFS mount options convosync=direct,mincache=direct,delaylog,nodatainlog for the data and index files. On 11.11, in almost every case cooked files are going to outperform raw files but if you must, here's how to do it:

Let's suppose that you have a datafile /u01/oradata/file01.dat that you want to make into a raw file.

0) Shutdown the database.

1) Create a raw logical volume about 1MB larger than the existing file01.dat. Let's call it /dev/vg05/rlvol1

2) Copy /u01/oradata/file01.dat to /dev/vg05/rlvol1 using dd. e.g. dd bs=64k if=/u01/oradata/fileo1.dat of=/dev/vg05/rlvol1

3) Rename the original file. e.g. mv /u01/oradata/file01.dat /u01/oradata/file01.dat.safe

4) Symbolically link the files. e.g.
ln -s /dev/vg05/rlvol1 /u01/oradata/file01.dat

5) Repeat for as many files as you like

6) Start the database.

P.S. I still think this is a dumb idea (unless this is a parallel server).

If it ain't broke, I can fix that.
Yogeeraj_1
Honored Contributor

Re: want to move a filesystem database to a raw-database

Hi,

to supplement the excellent post by Mr. A. Clay Stephenson above, please also see the following URL:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf9caa848deccd61190050090279cd0f9,00.html

Hope this helps!

All the best.

Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)