[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

cplv Command

Purpose

Copies the contents of a logical volume to a new logical volume.

Syntax

To Copy to a New Logical Volume

cplv-v VolumeGroup ] [ -y NewLogicalVolume -Y Prefix ] SourceLogicalVolume

To Copy to an Existing Logical Volume

cplv -e DestinationLogicalVolume -f ] SourceLogicalVolume

Description

Attention: Do not copy from a larger logical volume containing data to a smaller one. Doing so results in a corrupted file system because some data (including the superblock) is not copied.
Attention: This command will fail if the cplv creates a new logical volume and the volume group is varied on in concurrent mode.

The cplv command copies the contents of SourceLogicalVolume to a new or existing DestinationLogicalVolume. The SourceLogicalVolume parameter can be a logical volume name or a logical volume ID. The cplv command creates a new logical volume with a system-generated name by using the default syntax. The system-generated name is displayed.

Notes:
  1. If you are copying a striped logical volume and the destination logical volume does not exist, an identical copy, including the striped block size and striping width of the source logical volume is created and then the data is copied.
  2. If you are copying a striped logical volume and you have created the destination logical volume, with the mklv command using a different stripe block size and striping width, or the destination is not a striped logical volume, the new characteristics are maintained, and the data is copied from the source logical volume.
  3. To use this command, you must either have root user authority or be a member of the system group.

You can use the Web-based System Manager Volumes application (wsm lvm fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit cplv fast path to run this command.

Flags

-e Specifies that the DestinationLogicalVolume exists and that a new logical volume should not be created. If the DestinationLogicalVolume is smaller than the SourceLogicalVolume, the extra logical partitions are not copied. When you use this flag, any data already in the DestinationLogicalVolume is destroyed. For this reason, user confirmation is required, unless the -f flag is added. The Type characteristic of the DestinationLogicalVolume must be copy to prevent inadvertently overwriting data. To change the Type characteristic, use the chlv command.
-f Copies to an existing logical volume without requesting user confirmation.
-v VolumeGroup Specifies the volume group where the new logical volume resides. If this is not specified, the new logical volume resides in the same volume group as the SourceLogicalVolume.
-y NewLogicalVolume Specifies the name to use, in place of a system-generated name, for the new logical volume. Logical volume names must be unique systemwide names, and can range from 1 to 15 characters.
-Y Prefix Specifies a prefix to use in building a system-generated name for the new logical volume. The prefix must be less than or equal to 13 characters. A name cannot begin with a prefix already defined in the PdDv class in the Device Configuration Database for other devices, or a name already used by another device.

Examples

  1. To copy the contents of logical volume fslv03 to a new logical volume, enter:
    cplv fslv03
    The new logical volume is created, placed in the same volume group as fslv03 , and named by the system.
  2. To copy the contents of logical volume fslv03 to a new logical volume in volume group vg02 , enter:
    cplv -v vg02 
    fslv03
    The new logical volume is created, named, and added to volume group vg02 .
  3. To copy the contents of logical volume lv02 to a smaller, existing logical volume, lvtes t, without requiring user confirmation, enter:
    cplv -e lvtest -f lv02

Files

/usr/sbin Directory where the cplv command resides.

Related Information

The chlv command, migratepv command, mklv command.

The Logical Volume Storage Overview in AIX Version 4.3 System Management Guide: Operating System and Devices explains the Logical Volume Manager, physical volumes, logical volumes, volume groups, organization, ensuring data integrity, and understanding the allocation characteristics.

Setting up and running Web-based System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.

The System Management Interface Tool (SMIT): Overview in AIX Version 4.3 System Management Guide: Operating System and Devices explains the structure, main menus, and tasks that are done with SMIT.

AIX HACMP/6000 Concepts and Facilities.


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