La commande 'chmp' permet de gérer les groupes miroir d'un groupe de volume AIX.
En effet, il est possible de vouloir modifier le type de miroir pour passer d'un mode asynchrone à un mode synchrone et inversement.
Par exemple, il est possible de passer le groupe de miroir du mode asynchrone au mode synchrone par la commande :
# chmp -S -m PoolName1 nom_vg1
Pour lister ensuite les informations sur le groupe miroir, il faut utiliser la commande 'lsmp'.
La documentation officielle V6.1 est donnée ci-dessous :
chmp Command
Purpose
Changes the characteristics of a mirror pool.
Syntax
chmp -A [ -c aiocachelvname ] [ -h highwatermark ] -m mirrorpoolname vgname
chmp -h highwatermark -m mirrorpoolname vgname
chmp -S [-f ] -m mirrorpoolname vgname
Description
The chmp command can perform the following operations:
* Configure a mirror pool for asynchronous mirroring using the -A flag.
* Set the high watermark of the I/O-cache logical volume with the -h flag.
* Detect a change in size of the I/O-cache logical volume and take appropriate actions.
* Change the mirror pool from asynchronous mirroring to synchronous mirroring with the -S flag.
* Change the I/O-cache logical volume that is used for asynchronous mirroring.
Note:
1 All disks in all mirror pools must be accessible to be configured for asynchronous mirroring.
2 After a mirror pool is configured for asynchronous mirroring, some active disks are needed from each mirror pool to convert the
mirror pool from asynchronous mirroring to synchronous mirroring. If you want to remove one or more mirror pools from a site
that is down, disable asynchronous mirroring using the chmp command with the -S and -f flags.
3 Asynchronous mirroring is only supported on nonconcurrent scalable volume groups with mirror pools set to be super strict.
4 You must disable the auto-on and bad-block relocation options of the volume group.
5 The volume group cannot be a snapshot volume group. The volume group cannot contain active paging-space logical volumes.
6 The volume group must be varied on to make mirror pool changes.
Flags
Item
Description
-A
Configures a mirror pool for asynchronous mirroring.
-c aiocachelvname
Specifies the name of an asynchronous I/O-cache logical volume. The logical volume must be of the aio_cache type and must not
reside in the mirror pool that is specified with the -m flag. If you do not specify the -c flag, the chmp command attempts to
find the appropriate logical volume of the aio_cache type.
-f
Forces a mirror pool from asynchronous mirroring to synchronous mirroring, even if the remote I/O cache is not accessible.
-h highwatermark
Specifies the I/O-cache high watermark. The value is the percent of I/O cache size. The default value is 100%. The flag also
detects an increase in size of the I/O-cache logical volumes and takes the appropriate action.
-m mirrorpoolname
Specifies the mirror pool name.
-S
Changes a mirror pool from asynchronous mirroring to synchronous mirroring.
Parameters
Item
Description
vgname
Specifies the volume group name where the mirror pool resides.
Examples
1 To set up an asynchronous mirroring for the mirror pool, enter the following sequence of commands:
A Create a scalable volume group with the mirror pool set to be super strict on local disks hdisk1, hdisk2, and hdisk3:
mkvg -f -S -M s -y gmvg1 hdisk1 hdisk2 hdisk3
B Disable the volume group auto-on and bad-block relocation:
chvg -a n -b n gmvg1
C Add the local disks into mirror pool MP1:
chpv -p MP1 hdisk1 hdisk2 hdisk3
D Create a logical volume for user data:
mklv -b n -p copy1=MP1 -y user_data_lv gmvg1 10
E Add the remote physical-volume devices hdisk4, hdisk5, and hdisk6 to mirror pool MP2 in volume group gmvg1:
extendvg -f -p MP2 gmvg1 hdisk4 hdisk5 hdisk6
F Add the remote mirror copy in the volume group using the mirrorvg command:
mirrorvg -c 2 -p copy2=MP2 gmvg1
G Add a logical volume of the aio_cache type in the local mirror pool:
Note: A mirror pool can contain only one I/O-cache logical volume. If the I/O-cache logical volume is mirrored, each
copy must be in a local mirror pool.
mklv -t aio_cache -p copy1=MP1 -y mp1_aiolv gmvg1 1
H Set up asynchronous mirroring for mirror pool MP2:
chmp -A -c mp1_aiolv -h 80 -m MP2 gmvg1
2 To change the mirror pool from asynchronous mirroring to synchronous mirroring, enter the following command:
chmp -S -m MP2 gmvg1
3 To change the mirroring attributes, such as high watermark, enter the following command:
chmp -h 90 -m MP2 gmvg
4 To replace the I/O-cache logical volume with a different I/O-cache logical volume, enter the following sequence of commands:
I Change the mirror pool from asynchronous mirroring to synchronous mirroring:
chmp -S -m MP2 gmvg1
J Remove the current I/O-cache logical volume mp1_aiolv that resides in mirror pool MP1:
rmlv mp1_aiolv
K Create a new I/O-cache logical volume in mirror pool MP1:
mklv -t aio_cache -p copy1=MP1 -y mp1_new_aiolv gmvg1 1
L Set up asynchronous mirroring for mirror pool MP2 using the new I/O-cache logical volume:
chmp -A -c mp1_new_aiolv -h 90 -m MP2 gmvg1