LVM - The Logical Volume Control Block


Contents

About this document
About the LVCB

About this document

This document describes the logical volume control block (LVCB) and discusses the warning cannot write lv control block data, which may result from database programs overwriting the LVCB. This document applies to AIX Versions 3.2, 4.x and 5.x.


About the LVCB

The logical volume control block (LVCB) is the first 512 bytes of a logical volume. This area holds important information such as the creation date of the logical volume, information about mirrored copies, and possible mount points in a journaled file system. Certain Logical Volume Manager (LVM) commands are required to update the LVCB, as part of completeness algorithms in LVM. These commands first read and analyze the old LVCB area to see if it is valid. If the information is verified as valid, then the LVCB is updated. If the information is not valid, then the LVCB update is not performed and the user is given the following warning message:

   Warning, cannot write lv control block data 

This message is a result of the LVCB being overwritten by database programs accessing the raw logical volumes, bypassing the journaled file system as storage media.

To check the LVCB data, use the following command, which will print a formatted output of the data in the LVCB record:

    getlvcb -AT <LVname> 

NOTE: This is not a documented user command.

For a normal LVCB, the very first line returned from the preceding command should be the characters AIX LVCB, followed by the intrapolicy, copies, interpolicy, and so on. If the first line is NOT AIX LVCB, or the values for the properties of the logical volume are not set within the valid value ranges, then the LVCB has been corrupted or overwritten.

Although this condition may seem fatal, it is not. Once the LVCB has been overwritten, the user can still:

There is a limitation caused by the deletion of the LVCB. The logical volumes with deleted LVCBs face possible incomplete importation into other AIX systems.

During an importvg, the LVM command will scan the LVCBs of all defined logical volumes in a volume group for information concerning the logical volumes. If the LVCB is deleted, the imported volume group will still define the logical volume to the new AIX system that is accessing this volume group. The user can still access the raw logical volume. Journaled file system information is lost and the logical volume and its associated mount point will not be imported into the new AIX system. The user must create new mount points. The availability of previous data stored in the file system is NOT assured.

All information relating to the type, the interpolicy, or the intrapolicy of the logical volume will revert back to default values (these are jfs, minimum, and middle). The type value is cosmetic, but the other two values may cause problems for any future extendlv, mklvcopy, reorgvg, or migratepv commands if they are not changed with the chlv command.

This problem can be fixed by recreating the logical volume and configuring the application that uses it to skip the first 512-byte block of the logical volume. All the data in the logical volume should be fine. IBM does not support operating in this manner and cannot guarantee the reliability of the data or the behavior of the LVM commands if the LVCB is corrupt.



[ Doc Ref: 90605209014744     Publish Date: Jun. 20, 2001]