[ Next Article |
Previous Article |
Book Contents |
Library Home |
Legal |
Search ]
Base Operating System and Extensions Technical Reference, Volume 1
lvm_deletelv Subroutine
Purpose
Deletes a logical volume from its volume group.
Library
Logical Volume Manager Library (liblvm.a)
Syntax
#include <lvm.h>
int lvm_deletelv (LV_ID)
struct lv_id *LV_ID;
Description
The lvm_deletelv subroutine deletes the logical volume specified by the LV_ID parameter from its volume group. The logical volume must not be opened, and the volume group must be online, or an error is returned. Also, all logical partitions belonging to this logical volume must be removed using the lvm_reducelv subroutine before the logical volume can be deleted.
Note: You must have root user authority to use this subroutine.
Parameters
LV_ID |
Specifies the logical volume to be deleted. |
Return Values
The lvm_deletelv subroutine returns a value of 0 upon successful completion.
Error Codes
If the lvm_deletelv subroutine fails, it returns one of the following values:
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_MIN_NUM |
An invalid minor number was received. |
LVM_INVALID_PARAM |
The logical volume ID passed in is not a valid logical volume, or the pointer to the logical volume is invalid. |
LVM_INVCONFIG |
An error occurred while attempting to configure this volume group into the kernel. This error will normally result if the major number in the mapped file is invalid. |
LVM_INV_DEVENT |
The device entry for the logical volume is invalid and cannot be checked to determine if it is raw. |
LVM_LVOPEN |
An open logical volume was encountered when it should be closed. |
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_NODELLV |
The logical volume cannot be deleted because there are existing logical partitions. |
LVM_NOTCHARDEV |
The device specified is not a raw or character device. |
LVM_OFFLINE |
A routine that requires a volume group to be online has encountered one that is offline. |
Implementation Specifics
This subroutine is part of Base Operating System (BOS) Runtime.
Related Information
The 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.
[ Next Article |
Previous Article |
Book Contents |
Library Home |
Legal |
Search ]