Operating System - HP-UX
1753876 Members
7387 Online
108809 Solutions
New Discussion юеВ

Re: Extend raw device for Oracle

 
Angelito_1
Occasional Contributor

Extend raw device for Oracle

Hi,

My Oracle database access to raw device data. If I have a link for Oracle:
data01.raw -> /dev/vgoracle/rlvol1

And I want to extend my rlvol:
# lvextend -l XX /dev/vgoracle/lvol1

Must I stop Oracle?. Must I re-link data01.raw?. Must I perform a backup of this rlvol before extending?.

Thanks in advance.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Extend raw device for Oracle

Shalom,

1 The lvextend is enough. The soft link just makes the raw device visible to admins so they don't wonder and wipe.

2 Not need to stop oracle for the extension. For Oracle to recognize the space probably requires a reboot and preparation of the new space.

3 Always back up the database before messing with its container.

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
Ivan Pechorin
Advisor

Re: Extend raw device for Oracle

Hi!

You can extend raw device without stopping Oracle.

1) lvextend -l XX /dev/vgoracle/lvol1

2) ALTER DATABASE DATAFILE '/../../data01.raw' RESIZE 1048568K;

Here 1048568K is the new size of your datafile, taken for example if new raw device size equals 1GB. In my experience, normally you have to specify datafile size to be slightly less than size of raw device:

datafile size = raw device size - 8K

In my example:

1048568K = 1048576K - 8K (= 1GB - 8K)

Anyway, you can try to resize datafile exactly up to the new size of your raw device. If the specified size doesn't fit in your raw device, you'll just get error message from Oracle. It's safe.

P.S. You should take backup before extending. Personally I recommend RMAN for any database backup.
Alzhy
Honored Contributor

Re: Extend raw device for Oracle

Your procedure is correct.

No need to stop Oracle or "reboot" as our salad head suggested...

And of course no need to relink...

And I can actually suggest, instead of extending, maybe adding a new raw device may be the safest avenue if you do not trust online DATAFILE extension/growth.. (But Hey, you trust Table Space datafile extension on Cooked -- why now RAW? -- just me...)


Enjoy.
Hakuna Matata.