LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-21-2004, 05:28 PM   #1
stjacqd
LQ Newbie
 
Registered: Jul 2004
Location: Canada
Distribution: SuSE Enterprise 8
Posts: 4

Rep: Reputation: 0
SuSE: How to create raw device


Hello everyone

I am new in Linux environment and I need to create raw device for our Informix database.

Actually, there is 15 raw already defind by default. (SuSE Enterprise 8)

ls /dev/raw


I need to create alot more.

In fact, I would like to create different range of raws per Informix database.

example:
/dev/raw/raw1 to /dev/raw/raw999 will be assign to logical volume
/dev/raw/raw1001 to /dev/raw/raw1999 will be assign to another group of logical volume.

/dev/raw/raw1 --- /dev/vgdev/lvdev1
.
.
/dev/raw/raw999 --> /dev/vgdev/lvdev999

/dev/raw/raw1001 - /dev/vgqas/lvqas1
.
.
/dev/raw/raw1999 - /dev/vgqas/lvqas999

and so on.

I do have several logical volume of 2 Gig to assign to raw device to allow Informix (7.31UD1) to work.

Now my question is:
How do we create more raws in the /dev/raw directory?
Is there any limit on how many raws that can be created?

What is the use of the file /etc/raw?

All input will be highly appreciated.
stjacqd
 
Old 07-22-2004, 07:03 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Without knowing anything at all about raw devices or /etc/raw I can tell you that you make devices with the mknod command.
man mknod

For instance if you type ls -l /dev/raw/ you should see to numbers between the group and the date. The numbers are separated by a comma, for instance for ram it would look like this:
Code:
brw-------    1 root     root       1,   1 May  5  1998 /dev/ram
The 1, 1 is the major, minor numbers. The b at the beginning of the line denotes the ram is a block device, as opposed to being a c or character device. So I could make another ram device like this:
mknod -m 0660 /dev/ram2 b 1 2
Code:
ls -l /dev/ram /dev/ram2
brw-------    1 root     root       1,   1 May  5  1998 /dev/ram
brw-rw----    1 root     root       1,   2 Jul 22  2004 /dev/ram2


Or if I wanted to make a bunch of devices:
for i in `seq 2 100`;do mknod -m 0660 /dev/ram$i b 1 $i;done


Last edited by /bin/bash; 07-22-2004 at 07:11 AM.
 
Old 07-22-2004, 10:18 AM   #3
stjacqd
LQ Newbie
 
Registered: Jul 2004
Location: Canada
Distribution: SuSE Enterprise 8
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for the answer.

Based on your information, I did try some creation of raws.

It look like that we cannot have more than 255 raw. Is it true?

mknod -m 660 /dev/raw/raw256 c 162 256
ls -l

Code:
crw-rw----    1 root     root     163,   0 Jul 22 06:12 raw256
What should we do when we need more than 255?

stjacqd
 
Old 07-22-2004, 07:29 PM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
I have this in my kernel config file.
CONFIG_MAX_RAW_DEVS=4096

Code:
crw-rw----   1 root root 162, 255 2004-07-22 18:31 raw255
crw-rw----   1 root root 162, 256 2004-07-22 18:31 raw256
It looks like you might need to make a new kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot open master raw device MDColson Mandriva 1 12-31-2004 02:55 PM
ASE master db on raw device? Andrastus Linux - Enterprise 0 12-13-2004 05:20 AM
block device raw access rvilarl Programming 0 10-24-2004 01:53 PM
How to enable raw i/o on partition (e.g. /dev/hdc1, non block device) psyclobe Programming 2 12-13-2003 07:59 AM
linux equiv. of raw disks and device paths iggymac Linux - Newbie 0 11-20-2003 11:46 PM


All times are GMT -5. The time now is 10:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration