Archiving Raw Logical Volumes


Contents

About this document
    Related documentation
Background
Logical volume control block
dd limitations
Steps to archive raw logical volumes

About this document

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.

Related documentation

The product documentation library is also available:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html


Background

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.


Logical volume control block

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.


dd limitations

The AIX dd command has some limitations which must be taken into consideration prior to archiving a raw logical volume.

  1. The dd command cannot span multiple tapes. You must be able to fit the entire raw logical volume onto one tape. If you require multiple tapes, your only AIX option for archiving a raw logical volume is to use SYSBACK 6000.
  2. The dd command in AIX 3.2 and 4.1 cannot archive a single file (or logical volume) greater than 2GB. In AIX 4.2, the dd command has been designed to archive data greater than 2GB in size.

Steps to archive raw logical volumes

  1. Decide on the appropriate tape device blocksize.

    Recommended values are:

        9track/ 1/4in = 512
        8mm/4mm/dlt = 1024
     
  2. Create an archived raw logical volume.

    NOTE: 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 bytes
        52 bytes + 460 blanks = 512 bytes
     
  3. To archive without software compression, run the following command:
        dd if=<lv> of=/dev/rmt0 ibs=512 obs=<bs> conv=sync 
    
  4. To archive with software compression, run the following command:
        dd if=<lv> bs=512 | compress | \ 
               dd of=/dev/rmt0 ibs=512 obs=<bs> conv=sync 
    
  5. Restoring a raw logical volume archive.

    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.

    1. Using the Current System LVCB

      • To restore without software compression, run the following command:
            dd if=/dev/rmt0 ibs=<bs> obs=512 | \ 
                    dd of=/dev/<lv> bs=512 skip=1 seek=1 
        
      • To restore with software compression, run the following command:
            dd if=/dev/rmt0 ibs=<bs> obs=512 | \ 
                uncompress | dd of=/dev/<lv> bs=512 skip=1 seek=1 
        
    2. Overwriting the Current System LVCB

      WARNING: You must NOT overwrite the LVCB unless you are certain you need to.

      • To restore without software compression, run the following command;
            dd if=/dev/rmt0 of=/dev/<lv> ibs<bs> obs=512 
        
      • To restore with software compression, run the following command:
            dd if=/dev/rmt0 ibs=<bs> obs=512 | \ 
                    uncompress | dd of=/dev/<lv> bs=512 
        




[ Doc Ref: 90605220514846     Publish Date: Spt. 29, 2000     4FAX Ref: 8578 ]