Skip to content


why it is good to automatically export NUM_PARALLEL_LPS=??

If you read the previous post and next the comment left by Marcus you may learn about one peculiar environment variable called NUM_PARALLEL_LPS. If you are so inclined, and read the syncvg command man page, you will learn that the value associated with this variable set the pace of a mirrored volume group re-sync – in the case the mirror went stale. There are many ways to re-synchronize a staled partitions. Depending on a situation one may be able to synchronize a volume group with one step while in a another case a few steps may be required (especially if ones environment requires/dictates the order in which the logical volumes get back on line synced).
In my case, in this case as in the previous post a SAN disk (one mirror) is lost, long enough for AIX to declare it missing and as the result the whole (mirrored) volume group stink and its logical volumes (or you may say the partitions of theses logical volumes) are declared staled.
But in this case the host has the following statement in it /etc/profile file:

export NUM_PARALLEL_LPS=8

I will not discuss the particular value assigned to this variable (maybe this host has more than one volume group and it possible for all of them to become stale simultaneously), what is important is the fact that this variable is set! Now, when a disk is declared missing, the monitoring agent sends an alert to a monitoring center which alerts the yours truly about a case of stale partitions on a specific host. I use the same procedure as in the previous post. Look what happens now.

wmd:/root>lsvg -l oracle_vg
oracle_vg:
LV NAME     TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
lvu20_lv    jfs2       44      88      2    open/stale    /u20
lvu21_lv    jfs2       44      88      2    open/stale    /u21
lvu30_lv    jfs2       264     528     2    open/stale    /u30
lvu31_lv    jfs2       264     528     2    open/stale    /u31
lvu40_lv    jfs2       3104    6208    2    open/stale    /u40
lvu50_lv    jfs2       808     1616    2    open/stale    /u50
egate_lv    jfs2       10      20      2    open/stale    /prod/egate
new_lv      jfs2       296     592     2    open/stale    /u10
u11_lv      jfs2       400     800     2    open/stale    /u11

OK, what is going on with this volume group?

wmd:/root>lsvg -p oracle_vg
oracle_vg:
PV_NAME   PV STATE  TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk4    active    5503        269         00..00..00..00..269
hdisk3    missing   5503        269         00..00..00..00..269

Next, in one step we will recover the disk and start volume group synchronization.

wmd:/root>varyonvg oracle_vg

wmd:/root>lsvg -p oracle_vg
oracle_vg:
PV_NAME    PV STATE  TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk4    active    5503        269         00..00..00..00..269
hdisk3    active    5503        269         00..00..00..00..269

But, look how the volume group is synchronized? This time the process “speed” is set by us.

wmd:/root>ps -ef | grep sync
root  2162818  1   0   Nov 17      - 215:08 /usr/sbin/syncd 60
root  6226158  1   0 12:35:38  pts/1  0:00 /bin/ksh /usr/sbin/syncvg -v oracle_vg
root 14484336  6226158   0 12:35:39  pts/1  0:00 lresynclv -P 8 -l 00ccc11f00004c000000010c1692f085

Do you see the -P 8? Do you know what it means? See the man page for syncvg

How did the syncvg command which was automatically called by the syncvg knew to use 8 partitions at a time? It learnt about it examining the running environment – the variable was set to the value of eight.

wmd:/root>env
_=/usr/bin/env
LANG=en_US
LOGIN=root
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/local/bin:/usr/local/sudo-1.6.6/bin
LC__FASTMSG=true
EDITOR=vi
LOGNAME=root
MAIL=/usr/spool/mail/root
LOCPATH=/usr/lib/nls/loc
PS1=wmd:$PWD>
USER=root
AUTHSTATE=compat
SHELL=/usr/bin/ksh
ODMDIR=/etc/objrepos
HOME=/root
NUM_PARALLEL_LPS=8
TERM=xterm
MAILMSG=[YOU HAVE NEW MAIL]
PWD=/root
TZ=EST5EDT
A__z=! LOGNAME
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
wmd:/root>

Have a peachy day sys admins.

Posted in AIX, Real life AIX.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.