Previous Topic: resize (Volume Management)--Resize a Volume.

Next Topic: move (Volume Management)--Move a Volume to Another Application

copy (Volume Management)--Copy a Volume

Copy a volume.

Syntax
volume copy <src>[%<spar>] [assign the DST variable value for your book][%<dpar>] [comment=<val>] [mirrored=<val>] [size=<val>] [fs_options=<val>] [--use-filer]                           [--fscpy [--prefill]] [ -n ] [--overwrite [--force]]
volume copy <src>[%<spar>] [assign the DST variable value for your book][%<dpar>] [--stripcomment] [mirrored=<val>] [size=<val>] [fs_options=<val>] [--use-filer]                           [--fscpy [--prefill]] [ -n ] [--overwrite [--force]]  
Options
<src>

Name of the existing volume to copy. May specify any volume

<spar>

Specifies the partition/logical volume to copy from (for example, '%parN[.parN]'). By default, a block level copy is done, leaving any additional space on the destination partition unused. If --fscpy is used, a filesystem level copy is done, in this case the filesystem will be created with the full size of the destination partition/volume and the fs_options property will be honored when creating the fs. If the source volume has no partition table, this property should not be specified to copy of the whole volume.

[assign the DST variable value for your book]

Name of the new copied volume. Must specify an application user or singleton class volume or global volume

<dpar>

Specifies the partition/logical volume to copy to (for example, '%parN[.parN]'). To copy the source to the whole destination volume (instead of a partition), this property should be left blank.

comment=<val>

Comment that is to be set for the destination volume

--stripcomment

Set the comment for the destination volume to empty.

mirrored=<val>

Set to 1 for mirrored volume.

size=<val>

Specify size for new volume. If not specified, the destination volume is created with the same size as the source volume. Units may be specified(for example, 128M[B], 2G[B]). If units are not specified, it is assumed that the size is in MB.

fs_options=<val>

File system-specific options. Only valid if --fscpy argument is specified.

--use-filer

If the copy operation can be done as a block level copy and this option is specified, do the block level copy in the filer instead of on the controller. This can be used for partitioned or unpartitioned volumes.

--fscpy

Perform file-level copy when copying the volume. If this option is not specified, block-level copy is performed.

--prefill

Allocate ALL blocks for new volume. This option is only valid if --fscpy is specified; otherwise it is ignored.

--overwrite

Overwrite destination volume if it exists

--force

Do not prompt for confirmation of overwrite

-n

Skip verification that volume reference is in the class descriptor if destination volume is an application singleton class volume.

Notes:

Examples
volume copy my-app:data my-app:data2

copy application user volume. The volume may be partitioned or unpartitioned

volume copy my-app:data my-app:data2 --fscpy

copy application user volume using file-level copy. (the operation will fail if any of the partitions are not supported by the Filer)

volume copy /system:MYSQL5.boot my-app:DBASE.boot -n

copy global catalog class volume

volume copy my-app:DBASE.boot my-app2:DBASE.boot

copy application singleton class volume

   volume copy my-app:data1%par3.par1 my-app:data2%par3.par1

copy logical partition 1 of a volume to partition 4 of another volume, volume data2 must exist and has a partitioning table that has partition 4 and is large enough

volume copy my-app:data1%par3.par1.home my-app:data2

copy lvm logical volume "home" (on the first logical partition of extended partition 3) to a separate unpartitioned volume. If the destination volume exist, --overwrite can be used to replace it.

volume copy my-app:data1 my-app:data2%par2 --fscpy

copy an unpartitioned volume as partition 2 on the destination volume, doing filesystem copy and using all of the space on the destination partition.