World Library  
Flag as Inappropriate
Email this Article

Raw device

Article Id: WHEBN0000479333
Reproduction Date:

Title: Raw device  
Author: World Heritage Encyclopedia
Language: English
Subject: Linux kernel, Mm tree, Dnotify, Linux PAM, IP Virtual Server
Collection: Linux Kernel Features, Unix File System Technology
Publisher: World Heritage Encyclopedia

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 (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 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.[1]

In Linux kernel, raw devices were deprecated and scheduled for removal at one point, because the O_DIRECT flag can be used instead.[2] However, later the decision was made to keep raw devices support since some software cannot use the O_DIRECT flag.[3] 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[4] 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).[5]


  1. ^ "FreeBSD Architecture Handbook". Retrieved 24 August 2015. 
  2. ^ Robert P. J. Day": [PATCH] Remove obsolete raw device support""". LKML. Retrieved 2014-04-29. 
  3. ^ Dave Jones. "LKML: Dave Jones: undeprecate raw driver.". Retrieved 24 August 2015. 
  4. ^ "raw". Retrieved 24 August 2015. 
  5. ^ "Raw devices". Retrieved 24 August 2015. 

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.