• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 806
  • Last Modified:

How can I create a swap file to used by Oracle 10gr2

I  want to make some testing working Oracle10gr2 using raw devices.
Fisrt at all I think I should create a raw device but my Unis knowledge is too basic ..
I have a unix file system structure and several files system are already defined and I can display them using  the bdf command.
Can anyone tell me the main tasks to do and  and how?
 
0
Enrique Gomez Esteban
Asked:
Enrique Gomez Esteban
  • 2
  • 2
1 Solution
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
Don't mix two different term here:
a) A swap file is a file (or disk partition) to be used for "swapping". The term
    "swapping" usually means to put data from memory (RAM) that has not
    been used for a while onto some space on a disk device to free up RAM
   for other data.
b) A raw device is some part of a disk (or sometimes even a file on an disk).
   You may think of it the same as a disk partition (or "slice" as Unix System
   V.4 started to call it).
Therefore, if you need a raw device (partition) for Oracle usage, make sure
you have an unused (free) partition on your disk and tell Oracle to use it.

Using Veritas Volume Manager (VxVM) you will create a new volume and
use (the raw device name) as you Oracle device (use .../rdsk/.. and not the
.../dsk/... named device)
0
 
Enrique Gomez EstebanConsultantAuthor Commented:
Thanks for your help.
The title - about swap  file -  is wrong it should be raw file as it is explained later (sorry).

Giving more details about what I need is that I have a remote root access a test system (Veritas is not availble for me I think so far) and I am trying to find out if I can create using HP-UX commands a raw disk.
Dou you think  the above it is posiible?
How can I do do it? What are the commands?
Do I need a new Physical disk?
Can I do it  reassigning some of the free space available?
How to check if a raw disk device is created?

As a sample my current FS structure is as follow:
/home/oracle$ bdf -l
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     425984  365712   59848   86% /
/dev/vg00/lvol1     311296  235152   75592   76% /stand
/dev/vg00/lvol8    3391488 3271824  119664   96% /var
/dev/vg00/lvol7    5627904 4196464 1420296   75% /usr
/dev/vg00/lvol4     204800  120768   83816   59% /tmp
/dev/vg00/lvol6    3506176 3485496   20680   99% /opt
/dev/vg00/lvol5      24576   17880    6696   73% /home
/dev/vg01/lvol02   30715904 21960578 8208163   73% /hd2
/dev/vg01/lvol01   40960000 37165024 3558904   91% /hd
/home/oracle$

Regards

Enri
-
0
 
Enrique Gomez EstebanConsultantAuthor Commented:
I was hoping to get a more detailed answer, but as there were a mistake describing the problem I think is better to close the issue.
0
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
Sorry not coming back earlier:

a) Check if there is free space on your HP server using "vgdisplay"
    or "vgdisplay -v"
    If there is no more free space on your disks ("Free PE"), you
    will need another (extra) disk. A PE usually equals 64 KB
b) Create a new logical volume with "lvcreate". This can be a stripe,
    mirrored stripe or whatever you like. See man page lvcreate(1M)
    A simple (single disk) volume with a size of 500 MB:
      lvcreate -L 500 -n <oraraw> /dev/vg0x /dev/dsk/c3t5d0
c) Tell Oracle to use the raw device /dev/vg0x/r<oraraw>

Substitute <oraraw> by any name you like.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now