Friday, May 15, 2015

How to monitor the status of the mirrorvg in aix?

How to monitor the status of the mirrorvg in aix?


If you run the mirrorvg command, it will lock the rootvg volume group and also you could not able to identify the status of the mirrorvg and you could not able guess how long it will take to complete the sync process.

But using below, you could able to identify the status of the sync, i mean you can able to identify how many stale pp still there to sync up. 

METHOD 1:

Mirror the rootvg Volume Group by executing below command:
#mirrorvg –S rootvg     (The ‘-S’ option  (Uppercase ‘S’) is for Background sync)

Type the following command to find out whether the disks are synchronized or not
#lsvg rootvg|grep STALE
STALE PVs: 1 STALE PPs: 34

Note: Wait until the ‘STALE PPs’ becomes 0 (zero), the synchronization time depends on the size of the  hard disk


METHOD2:

mirrorvg -s rootvg hdisk1    ('s' is in lower case)

Mirroring complete immediately after executing the below command with -s flag, but we have to execute the syncvg command by ourself.

syncvg -P 4 -v rootvg

-P flag is for number of threads that should be started to perform the sync process. it can not lock the volume group. so we can track the mirroring by another window.

Take the another window:

lsvg rootvg | grep STALE | xargs
STALE PVs: 1 STALE PPs: 95

Note: Wait until the ‘STALE PPs’ becomes 0 (zero), the synchronization time depends on the size of the  hard disk