This document describes how to archive raw logical volumes. It applies to AIX Versions 3.2.5 through 4.x.
There are only two methods for archiving raw logical volumes in AIX: using the dd command or obtaining a product called SYSBACK 6000. This document describes how to use the AIX dd command.
For additional information about SYSBACK 6000, contact your local marketing representative.
http://www.rs6000.ibm.com/library
A raw logical volume is a physical partition that is not directly controlled by AIX and the file system. Usually it is for use with databases that need better performance than they would normally get with file systems.
Whatever the reason for using a raw logical volume, you must remember that AIX has the ability to allow a database program to use a raw logical volume for storing data, but expects that database program or utilities for that program to manage the data stored in that location. AIX data management tools are designed for working at the file system level, which is one level above the logical volume level.
WARNING: Please note that due to the nature and differences of the databases available today, IBM does not guarantee that any data in a database (raw or otherwise) will be recoverable using any AIX commands.
Every AIX logical volume has a 512-byte block at the beginning of the LV called the Logical Volume Control Block (LVCB). The LVCB keeps track of information in the logical volume. Some database vendors have chosen to write over the LVCB and use their own methods of keeping track of the information in the LV.
When using the AIX dd command for archiving and retrieving raw logical volumes, it is important to know if your database vendor uses the AIX LVCB or writes over it. This information is important and is referenced later in this document.
The AIX dd command has some limitations which must be taken into consideration prior to archiving a raw logical volume.
tctl -f /dev/rmt0 status
chdev -l rmt0 -a block_size=<bs>
Recommended values are:
9track/ 1/4in = 512NOTE: When you use the conv=sync flag, all reads that are smaller than the ibs value will be padded to equal the ibs value. This can greatly affect files sensitive to change, such as database files.
For example:
ibs=512; file filesize = 52 bytesdd if=<lv> of=/dev/rmt0 ibs=512 obs=<bs> conv=sync
dd if=<lv> bs=512 | compress | \ dd of=/dev/rmt0 ibs=512 obs=<bs> conv=sync
To restore a raw logical volume archive we must know whether or not to overwrite the Logical Volume Control Block. For more info on the LVCB, see the section "Logical volume control block".
NOTE: The skip=1 allows the read function to skip over one 512-byte block on the tape. The seek=1 allows the write function to skip over one 512-byte block on the disk.
dd if=/dev/rmt0 ibs=<bs> obs=512 | \ dd of=/dev/<lv> bs=512 skip=1 seek=1
dd if=/dev/rmt0 ibs=<bs> obs=512 | \ uncompress | dd of=/dev/<lv> bs=512 skip=1 seek=1
WARNING: You must NOT overwrite the LVCB unless you are certain you need to.
dd if=/dev/rmt0 of=/dev/<lv> ibs<bs> obs=512
dd if=/dev/rmt0 ibs=<bs> obs=512 | \ uncompress | dd of=/dev/<lv> bs=512