LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

raw

Bind raw character devices to block devices

TLDR

Bind a raw character device to a block device
$ raw /dev/raw/raw1 /dev/block_device
copy
Query an existing binding
$ raw /dev/raw/raw1
copy
Query all bound raw devices
$ raw -qa
copy

SYNOPSIS

raw /dev/raw/rawN major minorraw /dev/raw/rawN /dev/blockdevraw -q [-a] [rawN]

DESCRIPTION

raw binds Linux raw character devices to block devices, allowing direct (unbuffered) I/O access to the underlying storage. Raw devices bypass the kernel's buffer cache, providing direct access to block devices for applications that manage their own caching (like databases).When a raw device is bound to a block device, reading and writing to the raw device performs synchronous, direct I/O to the underlying storage without kernel buffering.

PARAMETERS

/dev/raw/rawN

Raw device node to bind or query
-q, --query
Query binding for specified raw device
-a, --all
Query all raw devices (with -q)
major minor
Block device specified by major/minor numbers
/dev/blockdev
Block device path to bind to raw device

CAVEATS

Raw devices are largely deprecated in favor of O_DIRECT flag on regular file I/O. Requires the raw driver to be loaded (modprobe raw). Raw device nodes must exist in /dev/raw/ before binding. Only root can bind raw devices.

HISTORY

Raw devices were introduced in Linux 2.4 to support databases like Oracle that required unbuffered I/O. The O_DIRECT flag added in later kernels provides similar functionality without dedicated raw devices, making this interface largely obsolete.

SEE ALSO

losetup(8), dd(1), blockdev(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid