[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 System Management Guide: Operating System and Devices

Defining a Raw Logical Volume for an Application

This procedure is used to define an area of physical and logical disk space that is under the direct control of an application rather than under control of the operating system and file system. The applications use character (raw) input and output rather than the block input and output of file systems, which require more software overhead. Bypassing the file system overhead enables applications to perform better. Raw logical volumes are most commonly used with database applications because of their need for high performance. While there is ordinarily a significant increase in performance, the actual amount of the increase depends on the database size and the driver provided by the application.

To prepare a raw logical volume, you simply create an ordinary logical volume without creating a file system on it.

Note: Do not be too concerned with the name of the application or how its documents use raw storage. The term used could be any one of the following: partition, slice, file system, raw access, raw disk, or logical volume. The important naming concerns are dealt with as follows:
Attention: Each logical volume has a logical-volume control block (LVCB) located in the first 512 bytes. Data begins in the second 512-byte block. Care must be taken when reading and writing directly to the logical volume, as is done with raw logical volumes, because the LVCB is not protected from raw-logical-volume access. If the LVCB is overwritten, commands that try to update the LVCB will fail and give a warning message. Although the logical volume will continue to operate correctly and the overwrite of the LVCB is an allowable event, it is not recommended that the LVCB be destroyed by raw-logical-volume I/O.

Prerequisites

Be sure to read the following before attempting to create a raw logical volume:

Procedure

Use the Web-based System Manager fast path wsm lvm or use the following procedure.

  1. Use the following SMIT fast path to find the free physical partitions (PPs) where you can create the raw logical volume:
    smit lspv
    Enter the volume group name, for example:
    rootvg
    Press Enter.
  2. Move the cursor to the disk that is most likely to have free physical partitions (possibly a disk with a higher number such as hdisk2 or hdisk3 ). Press Enter.
  3. Check the FREE PPs field and multiply this number by the PP SIZE field to get the total number of megabytes available on that disk for a raw logical volume.
  4. Make sure the number of free partitions is adequate based on your site's needs and the application's requirements. If the free space is not adequate, return to the previous menu and enter the name of a different disk or add a new physical volume if the free space is still not adequate. Exit SMIT.
  5. Create the raw logical volume using the following on the command line:
    mklv -y LVname VGName 38

In this example, -y indicates that you will name the logical volume instead of using a system name. The number 38 represents the number of 4MB physical partitions. The raw volume capacity in this example is thus 152MB. The raw logical volume you have created is now ready for your application to use.

For the next step, consult your application's instructions on how to use the raw space created. The instructions should include how to open /dev/LVName and how to use it.


[ Previous | Next | Contents | Glossary | Home | Search ]