Raw device


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. 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 FreeBSD, all device files 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.
In Linux kernel, raw devices were deprecated and scheduled for removal at one point, because the flag can be used instead. However, later the decision was made to keep raw devices support since some software cannot use the flag. Raw devices simply open block devices as if the flag would have been specified. Raw devices are character devices. The first minor number is reserved as a control interface and is usually found at. A command-line utility called 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.