raw devices disappear after rebooting linux red shat enterprise server 5

Hello,

I create raw devices in the /dev directory but they disappear everytime I reboot the machine and then I have to recreate them again.

What can I do to make them permanent?
ora-whatAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrjoltcolaCommented:
How did you create them? Did you add them to /etc/udev/rules.d/60-raw.rules ?

http://magazine.redhat.com/2008/09/17/tips-and-tricks-how-do-i-add-raw-device-mapping-in-red-hat-enterprise-linux-5/

Its been a while but I think I recall adding them to a file permanently, not just running a command (though you would think either would work, eh? Seems logical to me too)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
schwertnerCommented:
A utility called raw (see man raw) can be used to bind a raw device to an existing block device. These "existing block devices" may be disks or cdroms/dvds whose underlying interface can be anything supported by Linux (e.g. IDE/ATA or SCSI).

The raw devices interface has been deprecated in Red Hat Enterprise Linux 5.
The rawdevices service and /etc/sysconfig/rawdevices file no longer exist and
raw devices are now configured via udev rules. However the preferred method for
performing raw I/O (ie. bypassing filesystem caching) is to open EXT3/EXT2
files with the O_DIRECT flag.

raw is used to bind a Linux raw character device to a block device. Any block device may be used: at the time of binding, the device driver does not even have to be accessible (it may be loaded on demand as a kernel module later).
raw is used in two modes: it either sets raw device bindings, or it queries existing bindings. When setting a raw device, /dev/raw/raw<N> is the device name of an existing raw device node in the filesystem. The block device to which it is to be bound can be specified either in terms of its major and minor device numbers, or as a path name /dev/<blockdev> to an existing block device file.

The bindings already in existence can be queried with the -q option, with is used either with a raw device filename to query that one device, or with the -a option to query all bound raw devices.

Unbinding can be done by specifying major and minor 0.

Once bound to a block device, a raw device can be opened, read and written, just like the block device it is bound to. However, the raw device does not behave exactly like the block device. In particular, access to the raw device bypasses the kernel's block buffer cache entirely: all I/O is done directly to and from the address space of the process performing the I/O. If the underlying block device driver can support DMA, then no data copying at all is required to complete the I/O.

Because raw I/O involves direct hardware access to a process's memory, a few extra restrictions must be observed. All I/Os must be correctly aligned in memory and on disk: they must start at a sector offset on disk, they must be an exact number of sectors long, and the data buffer in virtual memory must also be aligned to a multiple of the sector size. The sector size is 512 bytes for most devices.

Use the /etc/sysconfig/rawdevices file to define the set of raw device mappings automatically created during the system startup sequence. The format of the file is the same used in the command line with the exception that the "raw" command itself is omitted.

Options
-q
Set query mode. raw will query an existing binding instead of setting a new one.
-a
With -q , specifies that all bound raw devices should be queried.
-h
provides a usage summary.
0
mrjoltcolaCommented:
a3,

I think both my and schwertner's posts gave valuable guidance for raw devices in Redhat 5. I would not suggest to delete this, as they are both tested approaches. Would prefer split and keep the question here, it is valuable.

I suspect the asker did not use the udev rules approach (/etc/udev/rules.d/60-raw.rules) to configure the devices, but perhaps tried the old raw utilities. As such, after reboot, the changes are not persistent.

mjc
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ora-whatAuthor Commented:
no it's ok I'm looking at it.. sorry I got sidetracked
0
ora-whatAuthor Commented:
I used the /etc/udev/rules.d/60-raw.rules and got it working quickly.

It was also Very good to know the current way of doing it.

From now on I will be respond faster with accepting solutions, thank you.
0
mrjoltcolaCommented:
Great, glad to know it worked for you! Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.