Operating System - HP-UX
1825759 Members
2182 Online
109687 Solutions
New Discussion

RAW device and block device

 
SOLVED
Go to solution
Mridul Dutta
Advisor

RAW device and block device

HI all

What is the difference between RAW device and Block device in HP-UX?

MRIDUL
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: RAW device and block device

The block device is cached. I/O to the device is read into memory, referred to as buffer cache, in large blocks. A raw device is more typically used with a data base application which provides the necessary buffering to achieve efficient I/O.


Pete

Pete
Christine Hartman
Valued Contributor
Solution

Re: RAW device and block device

Raw devices bypass the buffer cache and use DMA directly to/from the program's I/O buffers; they are normally restricted to full-sector transfers. Using raw devices generally will give you faster performance. Raw devices are used when making new filesystems, when checking unmounted filesystems, or for copying quiescent filesystems. The block devices are used to mount filesystems. Each disk has a block device interface where the system makes the device byte addressable and you can write a single byte in the middle of the disk.
Ivan Ferreira
Honored Contributor

Re: RAW device and block device

RAW devices can be faster for certain applications like databases because they does not contain a file system, and they don't use cache for the same reason. You don't mount a RAW device.

The problem is the management, you cannot manage a raw device using O.S. tools, for example, check capacity, backup and restore data (dd could be used but is not efficient), find files, etc.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?