Raw Device

In computing, specifically Unix-like operating systems, a raw device is a special kind of block device file that allows accessing a storage device such as a hard disk drive directly, bypassing the operating system's caches and buffers (although the hardware caches might still be used). Applications like a database management system can use raw devices directly, enabling them to manage how data is cached, rather than deferring this task to the operating system.

On FreeBSD, all block devices are in fact raw devices. Support for non-raw devices was removed in FreeBSD 4.0 in order to simplify buffer management and increase scalability and performance.

On Linux raw devices were deprecated and scheduled for removal at one point, because the O_DIRECT flag can be used instead. However, later the decision was made to keep raw devices support since some software cannot use the O_DIRECT flag. Raw devices simply open block devices as if the O_DIRECT flag would have been specified. Raw devices are character devices (major number 162). The first minor number (i.e. 0) is reserved as a control interface and is usually found at /dev/rawctl. A utility called raw can be used to bind a raw device to an existing block device. These "existing block devices" may be disks or CD-ROMs/DVDs whose underlying interface can be anything supported by Linux (e.g. IDE/ATA or SCSI).

Famous quotes containing the words raw and/or device:

    It began with begging.
    In the beginning it was all God’s icebox
    and everyone ate raw fish or animals
    and there was no fire at night to dance to,
    no fire at day to cook by.
    Anne Sexton (1928–1974)

    It is my hope to be able to prove that television is the greatest step forward we have yet made in the preservation of humanity. It will make of this Earth the paradise we have all envisioned, but have never seen.
    —Joseph O’Donnell. Clifford Sanforth. Professor James Houghland, Murder by Television, just before he demonstrates his new television device (1935)