Raw device

from Wikipedia, the free encyclopedia

A raw device or raw partition is Unix a character device file that allows direct access to a hard disk partition allowed. The raw device does not abstract the data via a file system . When accessing the device, the data carrier management of the operating system is largely bypassed.

Bypassing the file system of the operating system enables an application to optimize I / O operations on the stored data in relation to the application. The operating system has to process files of various sizes and satisfy various I / O profiles. However, this may not be suitable for some applications. The use of buffers and read-ahead optimization play an important role here .

Databases have very specific requirements for reading, writing and buffering data. Traditionally, they are much more efficient than the file systems of the host operating system if they take over the physical management of the data themselves. You are therefore also the main user of raw devices.

With the development of file systems that are able to adapt their cache behavior to the applications, the speed advantage has largely melted away or even leads to a considerable disadvantage, since the raw devices can adapt less well to the runtime behavior of the physical drive.

Commands that operate at the file system level cannot be used to secure raw devices. These include commands for copying (commands such as cp, copy), moving (commands such as mv, ren, rename) and archiving (tar). This must also be taken into account when backing up raw devices: Backup software that uses tar or cp in the background cannot easily be used for raw devices. Instead, a disk dump (command: dd) can be used. The disk dump creates a copy of the physical blocks that can then be backed up.

Some manufacturers offer their own tools for securing raw devices. For example, the command ocopy (Oracle Copy) or the backup tool RMAN (Recovery Manager from Oracle) can be used for Oracle databases . The security software from Adabas D can also handle raw devices.

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

Web links