1832994 Members
2688 Online
110048 Solutions
New Discussion

raw device on Oracle

 
Michael Mac
Occasional Advisor

raw device on Oracle

Hello all,

I had a Oracle "SYSTEM" tablespace is 250M on the raw device that would like to increase to 500M without create additional raw device.

Pleaes let me know if the following works!!
I check the vgdisplay and 400MB avaiable in the same device.
1) shutdow oracle
2) lvextend -L 500 /dev/vg1/lvdata
3) startup oracle
4) alter tablespace system add datafile "/dev/vg1/lvdata' size 500M;

Thanks,

Mike
5 REPLIES 5
Julio Yamawaki
Esteemed Contributor

Re: raw device on Oracle

Hi,

There´s no need to shutdown Oracle instance.
Just lvextend and then (inside sqlplus), issue the command: alter database datafile 'datafile_name' resize 500M;

Regards,
Michael Mac
Occasional Advisor

Re: raw device on Oracle

Juio,

Either shutdown or not...
Do you think if I use the lvextend by using sam raw device will it corrupt the SYSTEM tablespace.

Please explain...

I did try the other way by create additional raw device and work. But I prefer using the other way and clean.

Thanks,

Mike
Paul_481
Respected Contributor

Re: raw device on Oracle

Hi Mike,

There's no need to shutdown the database if you have onlineJFS. Just follow this steps:

1. lvextend -L 500 /dev/vg?/lvol?
2. fsadm -F vxfs -b $((1024*500)) /

This will automatically increase the logical volume and filesystem without shutting down the database.

Regards,
Paul
Indira Aramandla
Honored Contributor

Re: raw device on Oracle

Hi Michael,

Raw partitions are fixed in size when defined at the OS level and do not extend.

You can resize a file on a raw partition, BUT make sure the resize size is smaller than the raw device, it must be at least two Oracle block sizes smaller than the size of the raw partition.

You can do this on-line using the later database resixe commnad.

SQL> Alter database data file "/dev/vg1/lvdata' resize 500M;

Note :- You have to assign the raw device the appropriate size when you create it.
Then assign Oracle datafile on that specific raw partition unlike traditional file system, raw partition is not expandable, that means your oracle datafile can only expand up to the size of raw partition.

Indira A
Never give up, Keep Trying
Michael Mac
Occasional Advisor

Re: raw device on Oracle

Thank you for your helps.