Re: raw device on RedHat Linux
Posted in 2000
I've been using raw devices for IDS 7.30 under Linux for 12 months now, without any problems. It's worth noting that raw I/O will only work with SCSI disks. The standard dd command doesn't work because of block size alignment problems. A patched version of dd is available at the URL below. The Redhat 6.x kernel is already patched with Stephen Tweedie's raw IO patch. Try "cat /proc/devices" if this shows a device called "raw" then your kernel is already patched. Just read the man page on "raw" i.e type "man raw". Patches and a lot more info are available at the Linux raw IO project site: http://oss.sgi.com/projects/rawio/ Regards Chris. Malcolm Beattie wrote: > > In article <8vfvad$spb$1@news.xmission.com>, > Mitja Zabukovec <mitja.zabukovec@mais.si> wrote: > > > >On Wednesday 22 November 2000 00:00, you wrote: > >> Does anyone know whether RedHat Linux 7.0 supports raw device? I got 6.2 > >> installed at home but it doesn't support raw device. I believe raw device > >> is much better for informix performance. > >> > > > >what do you mean, it doesn't support raw device ? > >There is nothing to support. > >I installed informix on SuSE6.2 and put data onto raw device. > >I just left a disk partition blank and unmounted. That was partition > >/dev/hdb1. Since I just installed informix to test it, I put the data into > >rootdbs. The path for rootdbs was /dev/hdb1 and that's it. > >Informix can write to it, without OS knowing about it. > > That's not a raw device. That's still the block device for which > accesses will go via page/buffer cache. A *raw* devices is a > character device interface for which reads/writes go directly and > synchronously to the underlying disk. > > RedHat 7.0 include the raw device kernel patch in their distribution > and provide access to that via the userland utility raw(1) and via the > config file /etc/sysconfig/rawdevices which sets up your raw bindings > automatically at boot time. The file initially contains the following > comments as explanation: > > # raw device bindings > # format: <rawdev> <major> <minor> > # <rawdev> <blockdev> > # example: /dev/raw/raw1 /dev/sda1 > # /dev/raw/raw2 8 5 > > As it says, add lines to this file of the form > /dev/raw/raw1 /dev/sda1 > /dev/raw/raw2 /dev/sda2 > ... > > and then > /etc/rc.d/init.d/rawdevices restart > which do the necessary commands to set up the bindings (and that will > automatically be run at each boot time too). You can then tell your > raw-device-using software (Informix here) to use the devices > /dev/raw/raw1, ... as raw devices. You probably ought to check with > Informix (or others on this newsgroup who may know) that Informix is > OK to use with raw devices on Linux: for example, the raw device > interface only allows reads/writes of 512-byte multiples which are > 512-byte aligned. It's possible (though I'd guess unlikely) that > Informix needs the raw device to be more lenient about what reads and > writes it allows or that it expects some other additional interface > (ioctls say) in addition to the mere existence of the device. > > --Malcolm > > -- > Malcolm Beattie <mbeattie@sable.ox.ac.uk> > Oxford University Computing Services > "I permitted that as a demonstration of futility" --Grey Roger