Hi Bala,

Thanks for your detailed explanation. "Aspirin " example was a good example 
:-). 

So you mean to say that buffer time is saved. As i am new to Oracle i havent 
dealt with RAW devices

I just created a partition ( did not create a file system on that ).

Later binded that device using "raw" utility. I was using 2.6.18.x kernel which 
did not detect the raw partition as raw partition by default. 

Thanks again !!

vprabu

--- On Fri, 8/15/08, Bala <[EMAIL PROTECTED]> wrote:
From: Bala <[EMAIL PROTECTED]>
Subject: Re: [cbe-linux] RAW filesystem in linux
To: [email protected]
Cc: "vprabu vprabu" <[EMAIL PROTECTED]>
Date: Friday, August 15, 2008, 7:16 AM




Hi Friends,



This is a partial answer for your query...



Here is the definition which will gives you the clear view of what is RAW and 
BLOCK devices 



Raw devices are neither crunchy, healthy, nor full of vitamins, but are just a 
different way of accessing the same device. If you're not interested in an 
explanation, all you need to know is that certain programs expect to access a 
device through the standard device node and others expect to access the raw 
device node. Programs designed to work with raw device nodes will not work on 
the standard device node, and vice versa. Raw devices are sometimes called 
character devices, because they access the hard drive a character at a time. If 
you must control exactly how the data is laid down on the disk, such as when 
creating a file system in the first place, use a raw device.



A "standard" device node is more properly called a block device. Data 
transmitted to or from the device is buffered, meaning that chunks of data are 
collected until there is enough data to make it worth the trouble to access the 
device. A block device is occasionally called a cooked device. Block devices 
are generally considered more efficient than raw devices.



In contrast, a raw device does no buffering. If you tell a system to write to a 
file via a raw device, the data is immediately transmitted to the device. This 
works best when running a program that provides its own input/output buffering 
or has a particular way it wants to arrange disk data. Some software like 
Oracle, DB2 for example can use raw devices directly.  In this instance they 
bypass the normal system routines for reading/writing data to/from the disk and 
deal with this themselves using lower level i/o routines.  



Here's an easy way to remember the difference between block and raw throughput. 
Spill a bottle of aspirin. You might pick up the aspirin with your right hand 
and collect them in the left, until your left hand is comfortably full and you 
can dump a bunch into the bottle at once. You're buffering your aspirin 
transfers in your hand. (If it's buffered aspirin, then this is buffered 
buffered aspirin transfers. But let's not go there.) If you pick up each 
aspirin individually and deposit it directly in the bottle, it's considered an 
unbuffered or raw transfer.



Raw devices have an "r" in front of their name, but they refer to the same 
physical hardware as the block device. If a program opens /dev/wd0a, it's 
accessing the root partition on the first IDE hard drive in block mode; 
however, if it asks for /dev/rwd0a, it's accessing the same partition in raw 
mode.



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.



On Fri, 08 Aug 2008 vprabu vprabu wrote :

>

>Hi Friends

>

>      1) whats the difference between FILE SYSTEM and RAW DEVICE File

>

>      2) why do we have RAW DEVICE

>

>      3) How to create a RAW DEVICE File

>

>      4) How to create a " link " from  file system to RAW device

>

>

>

>

>

>[Non-text portions of this message have been removed]

>





----------------------------------------------------------


I do it because i can,                          


I can because I want to,                      


I want to because you said I couldn't.  


----------------------------------------------------------


..::::: With Best Regards "BALA" :::::...


----------------------------------------------------------





      

[Non-text portions of this message have been removed]

Kirim email ke