Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Informix > raw device

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-09-03, 09:55
georgipa georgipa is offline
Registered User
 
Join Date: Dec 2002
Posts: 146
Question raw device

Hi.

I need create a raw device in linux to database in infromix dymanic server, please yuo can send me an example for this activity.

Thank you.
Reply With Quote
  #2 (permalink)  
Old 01-09-03, 10:38
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Here are the steps to configure your Linux machine for rawio.

First, you have to have a partition that is unmounted. I did this by
reinstalling RedHat and not allocating all of my second hard drive. You can
use fdisk to do this.

Here is fdisk /dev/hdb

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 1655 cylinder

Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1020 8193118+ 83 Linux

I then created an extended partition with the n option.
/dev/hdb2

Then I created logical paritions inside the Extended partition with the n
option. It will prompt you for the cylinder to start and stop (I calculated
the size I wanted based on the cylinder size, there probably is an easier way)

/dev/hdb5
/dev/hdb6
/dev/hdb7

So now:

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 1655 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1020 8193118+ 83 Linux
/dev/hdb2 1021 1655 5100637+ 5 Extended
/dev/hdb5 1021 1270 2008093+ 83 Linux
/dev/hdb6 1271 1521 2016126 83 Linux
/dev/hdb7 1522 1655 1076323+ 83 Linux

Then make sure you exit properly:

Command (m for help): w

MAKE SURE YOU REBOOT AFTER THIS STEP

Once the system is back up you need to create the raw devices.

first make sure your devices are there:

ls -l /dev/hdb[5-7]
brw-rw---- 1 root disk 3, 69 May 5 1998 /dev/hdb5
brw-rw---- 1 root disk 3, 70 May 5 1998 /dev/hdb6
brw-rw---- 1 root disk 3, 71 May 5 1998 /dev/hdb7

Then create the raw devices by:

raw /dev/raw/raw1 /dev/hdb5
raw /dev/raw/raw2 /dev/hdb6
raw /dev/raw/raw3 /dev/hdb7

Then change the owner:group to informix; if this is for use by informix.
Then Verify them with:

raw -qa
/dev/raw/raw1: bound to major 3, minor 69
/dev/raw/raw2: bound to major 3, minor 70
/dev/raw/raw3: bound to major 3, minor 71

and ls -l /dev/raw/raw[1-3]
crw-rw---- 1 informix informix 162, 1 Oct 4 1999 /dev/raw/raw1
crw-rw---- 1 informix informix 162, 2 Oct 4 1999 /dev/raw/raw2
crw-rw---- 1 informix informix 162, 3 Oct 4 1999 /dev/raw/raw3

Notice that the raw -qa binds to the major and minor of the hdb[5-7] devices.

**Note: Theses raw devices to not stay once the system is rebooted. I created
a script to do this for me and put it in the init(rc) files.

The devices are ready.

To use Informix with this you simply need to create a link to point to the raw
device.

ln -s /dev/raw/raw1 /opt/chunks/rootchunk

ls -l /opt/chunks/rootchunk
lrwxrwxrwx 1 informix informix 13 Sep 15 14:14 /opt/chunks/rootchunk -> /dev/raw/raw1

If oninit gives you an error stating that /opt/chunks/rootchunk will not fit in
the device, or something to that effect, then that means you forgot to reboot
after you created the partitions.
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 01-13-03, 09:48
georgipa georgipa is offline
Registered User
 
Join Date: Dec 2002
Posts: 146
Angry

Hi,

You can send me this file to look what to do in this file.

Thank you.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On