cplv command

Purpose

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

Syntax

To Copy to a New Logical Volume

cplv [ -vg VolumeGroup ] [ -lv NewLogicalVolume | -prefix Prefix ] SourceLogicalVolume

To Copy to an Existing Logical Volume

cplv [ -f ] SourceLogicalVolume DestinationLogicalVolume

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 is not copied.
The cplv command copies the contents of SourceLogicalVolume to a new or existing logical volume. 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.
Note: The cplv command cannot copy logical volumes which are in the open state, including logical volumes that are being used as backing devices for virtual storage.

Flags

Flag name Description
-f Copies to an existing logical volume without requesting user confirmation.
-lv 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.
-prefix 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 be a name already used by another device.
-vg 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.

Examples

  1. To copy the contents of logical volume fslv03 to a new logical volume, type:
    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, type:
    cplv  -vg 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, lvtest, without requiring user confirmation, type:
    cplv -f lv02 lvtest



Last updated: Wed, November 18, 2020