Tuesday, August 9, 2016

What is a raw device ?

A raw device is a disk drive that does not yet have a file system set up. Raw devices are used for Real Application Clusters since they enable the sharing of disks.

The term raw devices applies to the character oriented disk device files (as opposed to the block oriented ones) normally found in /dev. These device files are a part of the interface between the hardware disks and the UNIX system software.
Raw devices are character devices. A utility called raw can be used to bind a raw device to an existing block device. These "existing block devices" may be disks or cdroms/dvds.
Raw Partition:
A raw partition is a portion of a physical disk that is accessed at the lowest possible level. A raw partition is created when an extended partition is created and logical partitions are assigned to it without any formatting. Once formatting is complete, it is called cooked partition

SCSI, SAN and NAS, iSCSI
Although not directly related to CFS and raw devices questions arise around the storage technologies being used.

SCSI:
Disk drives are connected individually to the host machine by small computer system interfaces (SCSI) through one of a number of disk controllers.
SAN:
Storage Area Network is a shared dedicated high-speed network connecting storage elements and the backend of the servers.
NAS:
Network Attached Storage is a special purpose server with its own embedded software that offers cross platform file sharing across the network.
iSCSI:
Another form of network attached storage that communicates in block mode over Ethernet (Gigabit Ethernet) to special storage subsystems. Like NFS attached storage, iSCSI uses standard hardware and software to communicate - although a private network is recommended. Because it operates in block mode, use of iSCSI with RAC requires either a cluster file system or use of raw volumes.
Raw devices suitable for complex applications like Database Management Systems that typically do their own caching because, raw device offers a more "direct" route to the physical device and allows an application more control over the timing of IO to that physical device. A raw device can be bound to an existing block device (for example a disk) and be used to perform "raw" IO with that existing block device. Such "raw" IO bypasses the caching that is normally associated with block devices
In most UNIX systems it is a performance advantage to use raw device files for data storage. By using raw devices, the UNIX file system is bypassed and the operating system is able to perform more effective I/O.
Since file size is fixed by the size of the partition, because of this, file size is constrained by the size of the partition. If the partition becomes full, the raw device file must be moved to a larger partition. In the worst case, the disk must be reformatted in order to create a larger partition.

No comments:

Post a Comment