System Admin Mirrorvg without locking the volume group

When you run the mirrorvg command, you will (by default) lock the volume group it is run against. This way, you have no way of knowing what the status is of the sync process that occurs after mirrorvg has run the mklvcopy commands for all the logical volumes in the volume group. Especially with very large volume groups, this can be a problem.

The solution however is easy: Make sure to run the mirrorvg command with the -s option, to prevent it to run the sync. Then, when mirrorvg has completed, run the syncvg yourself with the -P option.

For example, if you wish to mirror the rootvg from hdisk0 to hdisk1:

# mirrorvg -s rootvg hdisk1

Of course, make sure the new disk is included in the boot list for the rootvg:

# bootlist -m normal hdisk0 hdisk1

Now rootvg is mirrored, but not yet synced. Run "lsvg -l rootvg", and you'll see this. So run the syncvg command yourself. With the -P option you can specify the number of threads that should be started to perform the sync process. Usually, you can specify at least 2 to 3 times the number of cores in the system. Using the -P option has an extra feature: there will be no lock on the volume group, allowing you to run "lsvg rootvg" within another window, to check the status of the sync process.

# syncvg -P 4 -v rootvg

And in another window:

# lsvg rootvg | grep STALE | xargs

There are no attachments for this article.
Related Articles RSS Feed
AIX NFS Version 4 configuration over Kerberos inter-realm setup
Viewed 633 times since Wed, Jun 27, 2018
Managing System Dump Devices sysdumpdev
Viewed 721 times since Mon, Jul 9, 2018
Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment
Viewed 591 times since Thu, Sep 20, 2018
AIX Assign a PVID to a new hdisk
Viewed 2096 times since Tue, Jul 17, 2018
How to check dual path in AIX
Viewed 652 times since Fri, Jun 8, 2018
How to determine why your AIX oslevel is downlevel (and a script to help!)
Viewed 627 times since Fri, Jul 13, 2018
Backing up your VIOS configuration with viosbr.
Viewed 1106 times since Mon, May 28, 2018
Using Kerberos security with Server for NFS
Viewed 1033 times since Wed, Jun 27, 2018
AIX oslevel version OS
Viewed 984 times since Wed, Apr 17, 2019
0516-787 extendlv: Maximum allocation for logical volume error
Viewed 487 times since Tue, Mar 12, 2019