how to use and get raw devices

bert hubert (ahu@ds9a.nl)
Wed, 31 Jan 2001 19:48:57 +0100


On Wed, Jan 31, 2001 at 01:29:05PM -0500, Nathan Black wrote:

> That is what I wanted to do...Write directly to the disk. But the
> kernel(2.4.1) is caching the io...

Is it caching when you do O_SYNC?

> try opening with O_SYNC, or call fsync() every once in a while. Otherwise,
> this sounds like an application for a raw device, whereby you can write
> directly to the disk, with no caching in between.

A raw device is something different than just /dev/sda1 - a raw device is
created with the 'raw' utility and is assigned /dev/raw or /dev/raw1. This
utility, and some documentation can be found on

ftp://ftp.linux.org.uk/pub/linux/sct/fs/raw-io/raw-19990728.tar.gz

AFAIK you don't need any patches anymore if you run 2.4 or a recent 2.3.

Regards,

bert hubert

-- 
PowerDNS                     Versatile DNS Services  
Trilab                       The Technology People   
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/