In computing, specifically in Unix and Unix-like operating systems, a raw device is a special kind of logical device associated with a character device file that allows a storage device such as a hard disk drive to be accessed 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.
In Linux kernel, 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 command-line 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 the Linux kernel (for example, IDE/ATA or SCSI).
- "FreeBSD Architecture Handbook". Retrieved 24 August 2015.
- ""Robert P. J. Day": [PATCH] Remove obsolete raw device support". LKML. Retrieved 2014-04-29.
- Dave Jones. "LKML: Dave Jones: undeprecate raw driver.". lkml.org. Retrieved 24 August 2015.
- "raw(8)". util-linux Man Page.
- "Raw devices". tldp.org. Retrieved 24 August 2015.
|This Linux-related article is a stub. You can help Wikipedia by expanding it.|