add raw device for oracle 10g r2 (656 Views)
Reply
Occasional Visitor
guan_1
Posts: 1
Registered: ‎05-19-2011
Message 1 of 2 (656 Views)

add raw device for oracle 10g r2

Hi,we have a problem,a tablesapce has not enough spaces.I want to add a datafile,but the tablespace be created on raw device.
How to add a datafile for oralce on raw device?
THX!!!
software:
HP-UX 11i V3 ia 64
ORACLE 10.2.0.4.0
MC/cluster service guard

PS:
VG info:
--- Volume groups ---
VG Name /dev/VG_QDB_ORA02
VG Write Access read/write
VG Status available, exclusive
Max LV 511
Cur LV 61
Open LV 61
Max PV 511
Cur PV 1
Act PV 1
Max PE per PV 65536
VGDA 2
PE Size (Mbytes) 32
Total PE 31999
Alloc PE 31504
Free PE 495
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.0
VG Max Size 2t
VG Max Extents 65536

SIZE: 31504*32/1024=984.5GB

DATAFILE info:
select sum(bytes/1024/1024/1024) as datafile_GB
from v$datafile
where name like '/dev/VG_QDB_ORA02/%'

SIZE: 881.5234375GB
Please use plain text.
Valued Contributor
Valued Contributor
klb
Posts: 159
Registered: ‎12-05-2003
Message 2 of 2 (656 Views)

Re: add raw device for oracle 10g r2

At a high level and with no consideration to SG and other cluster constraints:

8GB addition...
lvcreate -L 8192M -n lv_new VG_QDB_ORA02
chown oracle: /dev/VG_QDB_ORA02/rlv_new

... then in oracle ...

alter tablespace add datafile
'/dev/VG_QDB_ORA02/rlv_new' size 8192M;
-- may need to decrease the size here by 4k or so.

Have a look at your current datafiles and duplicate what you see there in terms of naming and placement ( Oracle may be using links to the raw device file ):

select file_name from dba_data_files;

Hth,

-klb
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation