cpvdi command

Purpose

Copies a block device.

Syntax

cpvdi -src input_disk_image -dst output_disk_image [-isp input_storage_pool] [-osp output_storage_pool] [-progress] [-overwrite] [-unconfigure] [-f]

Description

The cpvdi command copies a block device image, which can be either a logical or physical volume, a file-backed device, or a file on another existing disk. The parameters of the -src and -dst flags should be fully qualified names when specifying a file or device. Specifying the -progress flag prints a number sign (#) on the stderr for each block (1 M) of data copied on to the destination.
Note: The output_disk_image device that you specify with the -dst flag cannot be a physical volume that is assigned to a shared memory pool (to be used as a paging space device by a shared memory partition).

Flags

Flag name Description
-src input_disk_image Specifies the input backing device. The input backing device might either be a physical or logical volume or a file is located in the caller's home directory, any of its subdirectories or in the /mnt directory. The root user will not have any file location restrictions.
-dst output_disk_image Specifies the output backing device. The output backing device might either be a physical or logical volume or a file is located in the caller's home directory, any of its subdirectories or in the /mnt directory. The root user will not have any file location restrictions.
-f Overwrites the destination file. However, if the source or destination file is configured as backing device, it copies the file without unconfiguring the device or devices. If the -unconfigure flag is used in addition to the -f flag, then the -unconfigure flag takes priority.
-progress Specifies the process status of the command will be expressed by printing a number sign (#) to stderr for every 1024 KB block of data that has been copied.
-isp input_storage_pool Specifies the name of the storage pool where the input file-backed device exists. Required if the argument of the -src flag is a file-backed device.
-osp output_storage_pool Specifies the name of the storage pool where the input file-backed device exists. Required if the argument of the -dst flag is a file-backed device.
-overwrite Overwrites the destination file, if the file is present. If you do not use this flag, an error message displays with a non-zero exit code.
-unconfigure Specifies to unconfigure the virtual target device (VTD) and reconfigure the VTD after a copy operation. Only use this flag if the source or destination file is configured as backing device. If you do not use this flag, an error message displays with a non-zero exit code.

Examples

  1. To copy a physical volume disk image to a file, type the following command:
    cpvdi -src hdisk1 -dst /home/my_home/image1_file
  2. To copy a disk image that is a file to a physical volume, type the following command:
    cpvdi -src /home/my_home/image2_file -dst hdisk2
  3. To output a hash symbol for every block of data that is copied, type the following command:
    cpvdi -src hdisk1 -dst hdisk2 -progress
  4. To copy a file-backed device to another file-backed device, type the following command:
    cpvdi -src image1_file -dst image2_file -isp sp01 -osp sp02
  5. To copy a file1 to file2, when file2 already exists, type the following command:
    cpvdi -src /home/padmin/file1 -dst /home/padmin/file2 -overwrite
  6. To copy a file-backed device fbd1 as fbd2, when fbd1 is configured as the backing device, type the following command:
    cpvdi -src fbd1 -dst fbd2 -isp sp01 -osp sp01 -f



Last updated: Wed, November 18, 2020