[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

lvm_resynclp Subroutine

Purpose

Synchronizes all physical partitions for a logical partition.

Library

Logical Volume Manager Library (liblvm.a)

Syntax

#include <lvm.h>
int lvm_resynclp (LV_ID, LP_Num, Force)
struct Lv_id *LV_ID;
long LP_Num;
int Force;

Description

Note: You must have root user authority to use this subroutine.

The lvm_resynclp subroutine initiates resynchronization for all the existing physical partition copies of the specified logical partition, if required.

The LV_ID parameter specifies the logical volume that contains the logical partition needing resynchronization. The LP_Num parameter is the logical partition number within the logical volume to be resynchronized. The volume group must be varied on, or an error is returned.

The Force parameter is used to specify whether all physical copies or only stale physical copies of a logical partition are to be resynchronized. When the Force parameter is False, a good physical copy is propagated only to the stale physical copies. This is sufficient for most logical volumes.

If the Force parameter is True, a good physical copy is chosen and propagated to all other copies of the logical partition whether or not they are stale. Setting the Force parameter to True is sometimes necessary in cases where mirror-write consistency recovery was not specified for the logical volume. This is especially important after a crash occurs while writing to the logical volume. It is recommended that mirror write consistency be selected for most mirrored logical volumes. For more information on mirror write consistency, see the lvm_createlv and lvm_changelv subroutines.

Parameters

LP_Num Specifies the logical partition number within the logical volume to be resynchronized.
LV_ID Specifies the logical volume that contains the logical partition needing resynchronization.
Force Specifies whether all physical copies or only stale physical copies of a logical partition are to be resynchronized.

Return Values

Upon successful completion, the lvm_resynclp subroutine returns a value of 0.

Error Codes

If the lvm_resynclp subroutine fails, it returns one of the following error codes:

LVM_ALLOCERR A memory allocation error occurred.
LVM_DALVOPN The logical volume reserved by the volume group could not be opened.
LVM_FORCEOFF The volume group has been forcefully varied off due to a loss of quorum.
LVM_INVALID_PARAM One of the fields passed in did not have a valid value.
LVM_INV_DEVENT A device has a major number that does not correspond to the volume group being worked in.
LVM_INVALID_MIN_NUM An invalid minor number was received.
LVM_MAPFBSY The volume group is currently locked because system management on the volume group is being done by another process.
LVM_MAPFOPN The mapped file, which contains a copy of the volume group descriptor area used for making changes to the volume group, could not be opened.
LVM_MAPFRDWR An error occurred while trying to read or write the mapped file.
LVM_NOTCHARDEV A device is not a raw or character device.
LVM_NOTSYNCED The logical partition was not completely resynced.
LVM_OFFLINE The volume group is offline and should be online.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The lvm_changelv subroutine, lvm_createlv subroutine, lvm_extendlv subroutine, lvm_resynclv subroutine, lvm_resyncpv subroutine, lvm_varyonvg subroutine.

List of Logical Volume Subroutines and Logical Volume Programming Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


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