Document ID: 190400
http://support.veritas.com/docs/190400
E-Mail Colleague IconE-Mail this document to a colleague

How to find out the percentage of completion of an atomic copy or mirrored plex resync

Details:
Prior to VERITAS Volume Manager (VxVM) 3.x, there were no commands available to allow viewing the percentage of completion of a plex resynchronization or plex attach (atomic copy)

Below is a script that can be added to the system to enable finding out approximately what that percentage of completion is.

1) Enter the following script and name it vxpercent.sh  

#!/usr/bin/ksh
vxprint  $@ |
while read line; do
echo $line | read tag plex vol kstate len off state tutil putil
if [ X$tag = X"pl" -a X$tutil = X"ATT" ]; then
offset=$(vxtrace -t 1 $plex | tail -1 | cut -f9 -d" ")
percent=$(( 100 * 0$offset / $len ))
echo "$line" | sed "s/ATT     /ATT $percent%\ /"
else
if [ X$tag = X"v" -a X$state = X"SYNC" ]; then
offset=$(vxprint -l $plex | grep flags | sed "s/.*offset=\([0-9][0-9]*\).*
/\1/")
percent=$(( 100 * 0$offset / $len ))
echo "$line" | sed "s/SYNC    /SYNC $percent%/"
else
echo "$line"
fi
fi;
done;

2) If given no options the script will list all of the volumes.

When using the vxpercent.sh <volume name> syntax, an output similar to the following will be seen:

# vxpercent.sh testvol

Disk group: clarii0n

TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
v  testvol      fsgen        ENABLED  12582912 -        ACTIVE   ATT1    -
pl testvol-01   testvol      ENABLED  12593568 -        ACTIVE   -       -
sd clarii009-01 testvol-01   ENABLED  3148320  0        -        -       -
sd clarii010-01 testvol-01   ENABLED  3148320  0        -        -       -
sd clarii001-01 testvol-01   ENABLED  3148320  0        -        -       -
sd clarii002-01 testvol-01   ENABLED  3148320  0        -        -       -
pl testvol-02   testvol      ENABLED  12593568 -        TEMPRMSD ATT 39% -
sd clarii007-02 testvol-02   ENABLED  3148320  0        -        -       -
sd clarii003-02 testvol-02   ENABLED  3148320  0        -        -       -
sd clarii004-02 testvol-02   ENABLED  3148320  0        -        -       -
sd clarii005-02 testvol-02   ENABLED  3148320  0        -        -       -

In the above example it is shown that plex testvol-02 is 39% completed.

NOTE: In VxVM 3.x, the vxtask (1m) command provides extended information and control over resync and recovery processes.

Products Applied:

Last Updated: November 28 2001 11:23 PM GMT
Expires on: 365 days from publish date
Subscribe Via E-Mail IconSubscribe to this document

Subjects:
 Volume Manager for UNIX
   Application: How To

Languages:
 English (US)

Operating Systems:
Solaris

2.5.1, 2.6, 7.0 (32-bit)


Was this article helpful to you?
Yes   No

If any information was unclear, or the information you were seeking was not provided, please let us know. Your feedback will help us improve this service.

NOTE: Comments entered here will NOT receive a personal e-mail response. If you need a VERITAS Technical Support representative to respond to your issue, please click here to send us an e-mail.