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.