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 |
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 mknod -m 0660 /dev/ram2 b 1 2 Code:
ls -l /dev/ram /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 |
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 stjacqd |
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 |
All times are GMT -5. The time now is 04:00 PM. |