2 Replies Latest reply on Dec 8, 2010 1:16 PM by Billy~Verreynne

    Difference between raw device and a block device

    797345
      Platform : Unix, Unix-like

      What is the difference between a raw device and a Block device? I found the following URL by googling. But, posts seem to be mutually contradictory
      http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1291798907338+28353475&threadId=583811
        • 1. Re: Difference between raw device and a block device
          Rajesh Lathwal
          a raw device is a special kind of block device file that allows accessing a storage device such as a hard drive directly, bypassing the operating system's caches and buffers (although the hardware caches might still be used). Applications like a Database management system(Oracle ) can use raw devices directly, enabling them to manage how data is cached, rather than deferring this task to the operating system.

          block devices correspond to devices through which the system moves data in the form of blocks. These device nodes often represent addressable devices such as hard disks, CD-ROM drives, or memory-regions.

          Also Check :

          http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1291806443666+28353475&threadId=987277

          Regards
          Rajesh
          • 2. Re: Difference between raw device and a block device
            Billy~Verreynne
            Difference between raw device and a block device
            Simply put.

            Raw device is a character device -and can be opened using the "+direct I/O"+ flag. Block devices (in the past) could not - so you had to slap a raw device interface on top of it in order to use direct I/O on the underlying device.

            With the later Linux kernels, direct I/O support was introduced for block devices. There is thus no longer a need to use a character (raw) device interface instead to access (directly) the underlying device. Therefore raw device support is no longer needed for direct I/O on block devices.