Well, the vacations are over and I am back at the workbench……. . Last weekend, we were moving a cluster from one data center to another. from one network to another, from one set of SAN switches to another. All not only ended well, but proved to be yet another opportunity to learn something new.
The physical relocation completed, some volume groups varied on with the STALE stale partitions, which detected by cluster daemons immediately resulted in the cluster executing the syncvg -P 4 ...... command against the appropriate volume groups.
For me the number of LPS being “synced” in parallel was too small; it is a matter of fact that I (for some unknown even to me reason) always set the parallelism value to 24 (-P 24). For each machine I have root login, I put this entry in its /etc/profile:
export NUM_PARALLEL_LPS=24
This line gives my a peace of mind; whenever the syncvg command is executed (by me or someone else) the parallelism aka the number of LPs processed (synchronized) in parallel by the syncvg command will be set to 24 (unless it has been explicitly set to a different value). By the way, I think that the maximum value is 32.
Looking into the contents of the /etc/profile on the cluster nodes and not finding my entry I put it in.
At the next cluster POWER ON, two volume groups still had the STALE partitions and regardless of export NUM_PARALLEL_LPS=24 in the /etc/profile file the syncvg command was executed with -P 4 instead.
As in this case, Google was not really helpful, I had to start looking for the answer somewhere else. Looking into the file /var/hacmp/log/hacmp.out, I discovered why the entry I placed inside the /etc/profile files does not work - because PowerHA does not look into this file for the answer! It looks into the other one instead! Here is the excerpt, read for yourself:
This logical volume has stale partitions, so sync it. Doing 4 stale partitions at a time seems to be a win most of the time. However, we will honor the NUM_PARALLEL_LPS value in /etc/environment, if set.
As you can see, PowerHA (HACMP) peeks inside the /etc/environment to find out if the NUM_PARALLEL_LPS has been preset, otherwise the syncvg command will be executed with NUM_PARALLEL_LPS=4.
To make both LVM and HA happy, one could place the entry defining the required value of this variable in the file /etc/environment. This way AIX will load this variable into the environment and HA will be able to find it too. Remember that variable placed in /etc/environment do not require the export statement, so the simple assignment is enough: NUM_PARALLEL_LPS=24.
UPDATE: if a cluster volume group is mirrored with any of the two SYNC options (background/foreground), you have no way to control the speed of "mirroring" - the command mirrorvg does not have this option. So with this in mind, mirror without the "SYNC" and then at a later time execute the syncvg against the appropriate volume group. Doing it this way, the sync will proceed using the value of NUM_PARALLEL_LPS defined in the file /etc/environment .



/etc/environment will also have it in place in case you ever launch from cron or inittab.
Chris, thanks for your input!
MarkD:-)
Yep, maximum value for NUM_PARALLEL_LPS is 32.
“Update PowerHA calls to the “syncvg” command to consider the
/etc/environment value of NUM_PARALLEL_LPS when determining
the value to pass for the -P parameter. The default is 4, and
the maximum is 32.”
http://www-304.ibm.com/support/docview.wss?uid=isg1IZ66061
you are correct. an entry in
/etc/environmentis enough.in my case it is easier to addt this entry to the environment file than to remove NUM_PARALLEL_LPS from profile and then re-enter it in the environment. call me lazy if you wish:-)
thanks for making this post better!
Mark
make sense : PowerHA don’t log in the system (no shells), so don’t go throught /etc/profile.
But why keep NUM_PARALLEL_LPS=24 in /etc/profile if you got it in /etc/environment ?
just keep it in /etc/environment et check it with the command env.
By the way thank for the variable, i have some (not often) SAN/FC which goes offline and i have to varyong my vg to solve the STALE PB. this will help to go faster (same goes for HA takeover).