System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

moving oracle directory out of / directory

Nancy Stout
Frequent Advisor

moving oracle directory out of / directory

My / directory is at 99% and I believe it is because the oracle directory is under this directory. What I want to do is move the /oracle directory to a separate mount point. The last time I tried this I got incorrect advice from H.P. and cause major problem. I would like to get anyone's asistance to see if my steps are correct or if you can give me the correct steps.

mkdir oracle_new
Stop all oracle process
umount all lv mounted under oracle
cd /oracle
find . | cpio -pdumv /oracle_new

Then I am not sure how I get this oracle_new directory to be mounted as /oracle and have everything respond correctly when the database is remounted.
9 REPLIES
Hasan Atasoy
Honored Contributor

Re: moving oracle directory out of / directory

hi ,


you neede to create anlogical volume in vg00 or another vg then


lvcreate -L 16000 -n lvoracle vg00
newfs -o largefiles /dev/vg00/rlvoracle

mount /dev/vg00/lvoracle /new_oracle

dump operation

umount /new_oracle
mount /dev/vg00/lvoracle /oracle

other mounts.

Hasan
Jeff Crew
Advisor

Re: moving oracle directory out of / directory

There are two things that come to mind for moving this Oracle directory:
1) If the directory contains binaries and executables from the Oracle install - This may required that you backup Oracle, and delete it and re-install. Because Oracle already knows where the program links and paths reside.

2) If the directory contains Oracle datafiles - Then stop your Oracle processes, back it up, create your new mount point or etc. Move that directory. Follow the Oracle procedures for "Backup & Recovery" to tell Oracle where the relocated datafiles reside.
Hein van den Heuvel
Honored Contributor

Re: moving oracle directory out of / directory

>> My / directory is at 99% and I believe it is because the oracle directory

Not good enough! on several levels!

1) Why only 'believe'.
Why not measure?! You know... du -sk /*

2) There really should only be mount points and 'system' stuff dierctly under /
Anything more is 'scary'

3) Did it 'fit' at some point? What changed?
Possible DUMP or TRACE files in the Oracle bdump, or udump directories?

>> move the /oracle directory to a separate mount point

Yes...

Use a temporary mountpoint name for the move, then rename to the the directory name that oracle has remembered 'everywhere'.

Or seeing where you are now, maybe just move SOME oracle stuff. Notably DB files,
Also easy to move are REDO logs, ARCH files, and the TEMP tablespace.

Good Luck!
Hein.
Carlos Zoller
Frequent Advisor

Re: moving oracle directory out of / directory

Hello,

I agree with has already been posted, first you need to know what amount of info corresponds to Oracle Software, and what to Oracle Data.

To do this issue a du -sk, standing in /oracle.

Also, you might want to check where all your Oracle datafiles are located, for that matter connect into Oracle as SYSDBA and issue the following query:

select name, bytes
from v$datafile;

This will tell you which datafiles reside on / filesystem.

If the major space is occupied by Oracle datafiles, then I you can relocate them very easily.

RGs,
Carlos Zoller
Frequent Advisor

Re: moving oracle directory out of / directory

Hello,

I agree with has already been posted, first you need to know what amount of info corresponds to Oracle Software, and what to Oracle Data.

To do this issue a du -sk, standing in /oracle.

Also, you might want to check where all your Oracle datafiles are located, for that matter connect into Oracle as SYSDBA and issue the following query:

select name, bytes
from v$datafile;

This will tell you which datafiles reside on / filesystem.

If the major space is occupied by Oracle datafiles, then you can relocate them very easily.

RGs,
Nancy Stout
Frequent Advisor

Re: moving oracle directory out of / directory

When I issue the command du -sk /oracle I get the information back of
140801904 /oracle.
I have separate mount points for all of the datafiles. When I do an ll /oracle I see under that directory the database directory and a client and stage directory. I believe we had a consultant at some time who successfully was able to move the /oracle to a mount point of its own out of the root directory. I wanted to be able to do this without the database administrator having to reload oracle or me having to restore from tape.
Carlos Zoller
Frequent Advisor

Re: moving oracle directory out of / directory

Nancy, in order to be able to give you some advice, please post the output of the following commands:

1. bdf
2. cd oracle
du -sk * (* will give you details for the subdirectories)
3. Also please execute the SQL query I gave you before, just to be sure how much space are database files consuming.

BRs,
Hein van den Heuvel
Honored Contributor

Re: moving oracle directory out of / directory

Nancy,

You attachement (why not plain .TXT instead of .DOC?) shows a very typical SAP / Oracle system layout.

You do NOT want to move /oracle.
That's just an anchor with many mount points under it. Those take no space on /.

[ allthough they may HIDE space: stick file in/under a directory, and next use that same directory as mount point will 'hide' the undelying allocations. An all to easily made operational error. ]


we'll have to dive below /*, and go for "du -sk /oracle/*

For clarify sake, you also try the -x option for 'du'.

Hein.

Nancy Stout
Frequent Advisor

Re: moving oracle directory out of / directory

Thank your for all the responses I have not decided in what direction I will be going.