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:

    Knowledge in the form of an informational commodity indispensable to productive power is already, and will continue to be, a major—perhaps the major—stake in the worldwide competition for power. It is conceivable that the nation-states will one day fight for control of information, just as they battled in the past for control over territory, and afterwards for control over access to and exploitation of raw materials and cheap labor.
    Jean François Lyotard (b. 1924)

    Irony, forsooth! Guard yourself, Engineer, from the sort of irony that thrives up here; guard yourself altogether from taking on their mental attitude! Where irony is not a direct and classic device of oratory, not for a moment equivocal to a healthy mind, it makes for depravity, it becomes a drawback to civilization, an unclean traffic with the forces of reaction, vice and materialism.
    Thomas Mann (1875–1955)