Friday, March 28, 2008

Quickly - Raw devices summary

Yesterday, I posted an article about configuration of raw devices on RHEL 5 platform. Just for completeness, I would like to add a few words about what raw devices on Linux are useful for.

A raw device allows to do raw I/O operations with an underlying block device. The raw I/O operation means that it bypasses kernel's block buffer cache so the I/O operation is sent directly to the underlying device. The raw I/O operation or better the application issuing it has to be aware of physical layout of the device. That means it has to be aligned in memory and on disk as well. The operation has to begin at the specified sector offset and has to have the size of multiple sectors. The restriction holds for both memory and disk.

The feature is useful for application requiring direct access to device like DBMS which are doing data caching by themselves.

No comments: