Re: Can't create Oracle Instance with symbolic link to Raw devices

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 30 Jul 2002 16:01:44 -0700
Message-ID: <92eeeff0.0207301501.1a29ffdc_at_posting.google.com>


kenny_60559_at_yahoo.com (KENNY L. CHEN) wrote in message news:<83f59352.0207300845.6962ae71_at_posting.google.com>...
> rs_arwar_at_hotmail.com (Rauf Sarwar) wrote in message news:<92eeeff0.0207282054.3fabef91_at_posting.google.com>...
> > kenny_60559_at_yahoo.com (KENNY L. CHEN) wrote in message news:<83f59352.0207260242.2a87862c_at_posting.google.com>...
> > > Dear all,
> > >
> > > I tried to create an Oracle Instance on our HP-UX (64-bit) with
> > > symbolic link to Raw devices with no luck. The following is what I did
> > >
> > > 1. create several logical volumns as raw devices from a volumn group
> > > (vg01)
> > > and change owner to oracle. for example like :
> > >
> > > brw-rw--w- 1 oracle dba 64 0x01001d Jul 26 13:30
> > > orcl_redo2
> > > brw-rw--w- 1 oracle dba 64 0x01001e Jul 26 13:30
> > > orcl_redo3
> > > brw-rw--w- 1 oracle dba 64 0x01001b Jul 26 13:29
> > > orcl_system
> > > brw-rw--w- 1 oracle dba 64 0x010020 Jul 26 13:30
> > > orcl_temp
> > > crw-rw--w- 1 oracle dba 64 0x010021 Jul 26 13:30
> > > rorcl_data01
> > > crw-rw--w- 1 oracle dba 64 0x010022 Jul 26 13:31
> > > rorcl_idx01
> > > crw-rw--w- 1 oracle dba 64 0x010023 Jul 26 13:41
> > > rorcl_other
> > > ......etc.
> > >
> > > 2. make symbolic lin to those raw device as follow:
> > > ln -sf /dev/vg01/rorcl_data01 data01.dbf
> > > ln -sf /dev/vg01/rorcl_rds rds01.dbf
> > > ln -sf /dev/vg01/rorcl_system system01.dbf
> > > ln -sf /dev/vg01/rorcl_temp temp01.dbf
> > > ln -sf /dev/vg01/rorcl_idx01 tsidx01.dbf
> > > .... etc.
> > >
> > > 3. Run create database sql script as follow:
> > >
> > > connect internal
> > > startup nomount pfile=/oradata/orcl/pfile/initorcl.ora
> > > create database "orcl"
> > > maxinstances 1
> > > maxlogfiles 32
> > > maxdatafiles 200
> > > character set "US7ASCII"
> > > datafile '/oradata/orcl/data/system01.dbf' size 20M
> > > logfile '/oradata/orcl/redo/redo01.log' size 10M,
> > > '/oradata/orcl/redo/redo02.log' size 10M,
> > > '/oradata/orcl/redo/redo03.log' size 10M;
> > >
> > > and it generated error message as follow:
> > > ERROR at line 1:
> > > ORA-01501: CREATE DATABASE failed
> > > ORA-01519: error while processing file '?/rdbms/admin/sql.bsq' near
> > > line 407
> > > ORA-00604: error occurred at recursive SQL level 1
> > > ORA-19502: write error on file "/oradata/orcl/data/system01.dbf",
> > > blockno 5057
> > > (blocksize=4096)
> > > ORA-27072: skgfdisp: I/O error
> > > HP-UX Error: 2: No such file or directory
> > > Additional information: 5057
> > >
> > > I don't know the procedure is correct or not??? PLEASE ADVISE.
> > >
> > > THANK YOU...
> > >
> > > KEN
> >
> >
> > There are pros and cons in using raw devices vs Unix file system which
> > you can read in Metalink DocID's (29676.1 and 37914.1).
> >
> > 1) Both raw devices and links should be owned by oracle and in the dba
> > group. Since you have already changed the ownership of raw devices,
> > check ownership of your symbolic links. They should also be owned by
> > oracle and in the dba group.
> >
> > 2) Oracle allocates size of the datafile at creation time. Check the
> > size of your raw device to make sure it is greater then the filesize
> > you are trying to create.
> >
> >
> > HTH
> > //Rauf Sarwar
> =============
> Hello,
>
> Thank you ,Rauf.
>
> I increased the size of LVs a little more than datafiles and
> sucessfully created Oracle database. Originally, I created LVs which
> are exactly the same size for Oracle datafiles.For example, a 50 MB
> raw LV for SYSTEM tablespace which is 50 MB in size. Seems Oracle will
> consume a little more space.
>
> Since it's hard to resize Oracle datafiles in raw, is there any way to
> utilize
> all LVs space when datafiles are created. Or how to calculate the size
> of LV
> needed for a certain size of tablespace, for example, how much LV raw
> space needed for a 50 MB SYSEM tablespace?

Kenny,

Oracle uses 1024 Bytes = 1KB factor. So if you want to create a 50MB datafile, then you are actually looking at 1024 * 50 = 51,200KB filesize. Oracle actually creates 51,208KB size file...Not sure where extra 8KB gets added from. So in light of this, you should have absolute minimum 52,000KB raw space available (Add an extra 2-3 MB for safety).

Even though Raw devices bypass the Unix file buffering mechanism and will increase your IO performance by almost 25%, they are not very DBA friendly. They can become a pain specially when you have to closely manage your space. On one hand it is recommended to have your raw slices at equal size for each tablespace for load balancing...however, if your TEMP tablespace is only 150MB on a 500MB equally sliced raw device...then you are wasting that 350MB space. This is just one example.

It is recommended to do thorough cost/benefit analysis whether you should go Raw or Unix file system. I would strongly recommend to read the documents that I have provided the DocID's to on Metalink.

HTH
//Rauf Sarwar Received on Wed Jul 31 2002 - 01:01:44 CEST

Original text of this message