Raw Device

A raw device or raw partition is a Unix character device file that allows direct access to a hard disk partition. The raw device is not abstracted the data on a file system. When accessing the Device Disk Management of the operating system is largely bypassed.

Bypassing the file system of the operating system allows an application to optimize I / O operations on the stored data application specific. The operating system must handle files of different sizes and meet a wide range of I / O profiles. This, however, may be unsuitable for some applications. An important role is played by the use of buffers and the read-ahead optimization.

Databases have very specific requirements for the reading, writing and buffering data. Traditionally, they are much more efficient than the file systems of the host operating system when they take on the physical management of the data itself. Therefore, they are also major users of raw devices.

With the development of file systems that are able to coordinate their caching behavior to the applications, the speed advantage is melted away as far as possible, or even leads to a significant disadvantage because the raw devices themselves are less able to adjust to the runtime behavior of the physical disk.

To back up raw devices can execute commands that operate on file system level, not be used. These include commands for copying (commands such as cp, copy), move ( mv commands such as, reindeer, rename) and archive ( tar). This must be considered also in securing raw devices: backup software that uses tar or cp in the background, can not be used readily for raw devices. However, instead of a disk dump can ( command: dd ) can be used. Dump the disc produces a copy of the physical blocks, which can then be saved.

Some manufacturers offer their own tools for backing up raw devices. Thus it can be used for Oracle databases the command OCOPY (Oracle Copy) or the backup tool RMAN ( Recovery Manager from Oracle). Also the backup software from Adabas D can deal with raw devices.

Typical applications that write directly on raw devices, database management systems such as Oracle, DB2, Adabas D are (now SAP MaxDB ).

673873
de