Provides copies of data within the logical volume.
mklvcopy [ -a position] [ -e range] [ -k] [ -m mapfile] [ -s strict] [ -u upperbound] [ -p copyn=mirrorpool ] logicalvolume copies [physicalvolume...]
The mklvcopy command increases the number of copies in each logical partition in logicalvolume. This is accomplished by increasing the total number of physical partitions for each logical partition to the number represented by Copies. The logicalvolume parameter can be a logical volume name or logical volume ID. You can request that the physical partitions for the new copies be allocated on specific physical volumes (within the volume group) with the physicalvolume parameter; otherwise, all the physical volumes within the volume group are available for allocation.
The logical volume modified with this command uses the copies parameter as its new copy characteristic. The data in the new copies are not synchronized until one of the following occurs: the -k option is used, the volume group is activated by the varyonvg command, or the volume group or logical volume is synchronized explicitly by the syncvg command. Individual logical partitions are always updated as they are written to.
The default allocation policy is to use minimum numbering of physical volumes per logical volume copy, to place the physical partitions belong to a copy as contiguously as possible, and then to place the physical partitions in the desired region specified by the -a flag. Also, by default, each copy of a logical partition is placed on a separate physical volume.
You can use the Volumes application in Web-based System Manager (wsm) to change volume characteristics. You could also use the System Management Interface Tool (SMIT) smit mklvcopy fast path to run this command.
See the section "Administering a PowerHA® cluster" in the PowerHA SystemMirror Administration Guide, 7.1 or later, for a discussion of the behavior of this command in a PowerHA cluster.
Item | Description |
---|---|
-a position | Sets the intra-physical volume allocation policy (the position
of the logical partitions on the physical volume). The position variable
can be one of the following:
|
-e range | Sets the inter-physical volume allocation policy (the number
of physical volumes to extend across, using the volumes that provide
the best allocation). The range value is limited by the upperbound variable
(set with the -u flag), and can be one of the following:
|
-k | Synchronizes data in the new partitions. |
-m mapfile | Specifies the exact physical partitions to allocate. Partitions
are used in the order given by the file designated by the mapfile parameter.
All physical partitions belonging to a copy are allocated before allocating
for the next copy. The mapfile format is:
Important: When you
use map files, you must understand and adhere to all LV-allocation
parameters such as strictness, upperbound, and stripe width. Using
map files bypasses the checks done in the LVM-allocation routines.
This is important for striped LVs, which are assumed to have a typical
striped allocation pattern conforming to the stripe width.
|
-p copyn=mirrorpool | Assigns mirror pools to the copies being created. A mirror pool is assigned to a copy using the copyn=mirrorpool parameter. Specify a mirror pool for each copy being created. To specify more than one copyn=mirrorpool pair, provide multiple -p copyn=mirrorpool flags. |
-s strict | Determines the strict allocation policy. Copies of a logical
partition can be allocated to share or not to share the same physical
volume. The strict variable is represented by one of the following:
Note: When changing a nonsuper strict logical volume to a super strict logical volume, you must specify physical volumes or use the -u flag. |
-u upperbound | Sets the maximum number of physical volumes for new allocation. The value of the upperbound variable should be between one and the total maximum number of physical volumes per VG. When using super strictness, the upper bound indicates the maximum number of physical volumes allowed for each mirror copy. When using striped logical volumes, the upper bound must be multiple of stripewidth. |
To add physical partitions to the logical partitions in the logical volume lv01, so that a total of three copies exists for each logical partition, enter:
mklvcopy lv01 3
The logical partitions in the logical volume represented by directory lv01 have three copies.
Item | Description |
---|---|
/usr/sbin/mklvcopy | Contains the mklvcopy command. |