1825723 Members
2900 Online
109687 Solutions
New Discussion

use of raw volume

 
newunix
Frequent Advisor

use of raw volume

what is the use of raw disk in lvm rather than block device file.

is there any disadvantage and advantage in it.
2 REPLIES 2
sangilak
Trusted Contributor

Re: use of raw volume

Hi,


Raw volumes are addressed in character mode. This is, generally speaking, faster then block mode. As block mode requires buffering and character mode does not. Raw volumes are usually used for database applications (Oracle).


ADVANTAGES RAW:
(+) generally faster (although the difference is not as big as it used to be)

DISADVANTAGES RAW:
(-) you cannot address files directly on a raw volume (you will need through a RDBMS interface)
(-) no fsck alternative (so always make sure to shutdown everything correctly)


sangilak
Bill Hassell
Honored Contributor

Re: use of raw volume

The raw disk device file points to the same volume as the block or cooked device files. These lvols by themselves have no properties except a series of disk blocks. The block device file uses a different driver that is run through the buffer cache to help performance when the lvol contains a file system.

An lvol might have a filesystem created on it, or the raw device could be used as a swap device. But the most common application use of a raw lvol is for databases such as Sybase or Informix. Oracle can also be setup to use raw lvols, but in all cases, backup of these volumes will require specialized software. There are no files -- just a series of bytes that are only meaningful to the programs that created them.

From a sysadmin perspective, these can be tgricky to manage. There is nothing to prevent destroying the database volumes with newfs, so it is always a good idea NOT to use default lvol names (like lvol1, lvol2, etc). Using a different VG name like /dev/rawstuff is also useful.

But in the end, your database administrator will probably make the decision whether to use raw volumes or not.


Bill Hassell, sysadmin