mklvcopy Command

Purpose

Provides copies of data within the logical volume.

Syntax

mklvcopy [ -a position] [ -e range] [ -k] [ -m mapfile] [ -s strict] [ -u upperbound] [ -p copyn=mirrorpool ] logicalvolume copies [physicalvolume...]

Description

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.

Notes:
  • To use this command, you must either have root user authority or be a member of the system group.
  • To create a copy of a striped logical volume, all active nodes using the volume group must be at least AIX® 4.3.3 or later. Older versions will not be able to use the volume group after a mirror copy has been added to the striped logical volume.
  • The mklvcopy command is not allowed on a snapshot volume group.
  • When you create a copy of a logical volume with a superstrict allocation policy, the mklvcopy command first attempts to mimic the physical-partition mapping of the first mirror copy onto another set of disks in the volume group. This algorithm ignores the interphysical and intraphysical volume allocation policies, even when the policies are specified as arguments to the mklvcopy command. If it is not possible to mimic the first copy's physical partition mapping, the usual allocation algorithm, which utilizes the interphysical and intraphysical volume allocation policies, is used.

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.

Flags

Note: The -e and -s flags are not valid with a striped logical volume.
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:
m
Allocates logical partitions in the outer middle section of each physical volume. This is the default position.
c
Allocates logical partitions in the center section of each physical volume.
e
Allocates logical partitions in the outer edge section of each physical volume.
ie
Allocated logical partitions in the inner edge section of each physical volume.
im
Allocates logical partitions in the inner middle section of each physical volume.
-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:
x
Allocates across the maximum number of physical volumes.
m
Allocates logical partitions across the minimum number of physical volumes. This is the default for the -e flag.
-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:
PVname:PPnum1[-PPnum2]
where pvname is a physical volume name (for example, hdisk0). It is one record per physical partition or a range of consecutive physical partitions.
PVname
Name of the physical volume as specified by the system.
PPnum
Physical partition number.
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:
y
Sets a strict allocation policy, so copies for a logical partition cannot share the same physical volume. flag.
n
Does not set a strict allocation policy, so copies for a logical partition can share the same physical volume.
s
Sets a super strict allocation policy, so that the partitions allocated for one mirror cannot share a physical volume with the partitions from another mirror. See Note 4 for other effects of the superstrict allocation policy on mklvcopy behavior.
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.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in AIX Version 7.1 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Example

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.

Files

Item Description
/usr/sbin/mklvcopy Contains the mklvcopy command.