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
Kerberos, Active Directory and AIX
Viewed 5878 times since Mon, Jun 25, 2018
Installation of the Virtual I/O Server directly from the HMC
Viewed 17970 times since Tue, Jun 4, 2019
Part 3, Tuning swap space settings AIX7
Viewed 8614 times since Wed, Jun 19, 2019
AIX Errpt - Diag - Alog
Viewed 3106 times since Wed, Mar 20, 2019
Part 2, NFS monitoring and tuning
Viewed 5954 times since Mon, Jun 4, 2018
AIX↑ AIX www links
Viewed 3173 times since Sat, Apr 20, 2019
Unlock User ID in IBM AIX
Viewed 14110 times since Mon, May 28, 2018
How to setup an user in AIX
Viewed 2492 times since Mon, May 28, 2018
Tunneling With SSH to Your Destination
Viewed 3724 times since Wed, May 30, 2018
AIX, Security, System Admin↑ Fix user accounts
Viewed 4312 times since Fri, Apr 19, 2019