[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
System Management Guide:
Operating System and Devices
Define a Raw Logical Volume for an Application
A raw logical volume is an area of
physical and logical disk space that is under the direct control of an application,
such as a database or a partition, rather than under the direct control of
the operating system or a file system. Bypassing the file system can yield
better performance from the controlling application, especially from database
applications. The amount of improvement, however, depends on factors such
as the size of a database or the application's driver.
Note
You will need to provide the application with
the character or block special device file for the new raw logical volume,
as appropriate. The application will link to this device file when it attempts
opens, reads, writes, and so on.
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. In a raw
logical volume, the LVCB is not protected. If an application overwrites the
LVCB, commands that normally update the LVCB will fail and generate a message.
Although the logical volume might continue to operate correctly and the overwrite
can be an allowable event, overwriting the LVCB is not recommended.
The following instructions use SMIT and the command line interface to define
a raw logical volume. You can also use the Create a new logical
volume wizard in Web-based System Manager (select Volumes -> Overview and Tasks -> Create a new
logical volume). To define a raw logical volume within the wizard, accept
the default use, applications and data, from its first
selection screen. Online help is available if you need it.
- With root authority, find the free physical partitions on which you can
create the raw logical volume by typing the following SMIT fast path:
smit lspv
- Select a disk.
- Accept the default in the second dialog (status) and click OK.
- Multiply the value in the FREE PPs field by the value in the PP SIZE field
to get the total number of megabytes available for a raw logical volume on
the selected disk. If the amount of free space is not adequate, select a different
disk until you find one that has enough available free space.
- Exit SMIT.
- Use the mklv command to create the raw logical volume.
The following command creates a raw logical volume named lvdb2003 in
the db2vg volume group using 38 4-MB physical partitions:
mklv -y lvdb2003 db2vg 38
Use the -y flag to
provide a name for the logical volume instead of using a system-generated
name.
At this point, the raw logical volume is created. If you list the contents
of your volume group, a raw logical volume is shown with the default type,
which is jfs. This type entry for a logical volume is simply a label. It does
not indicate a file system is mounted for your raw logical volume.
Consult your application's instructions on how to open /dev/rawLVname and how to use this raw space.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]