The following error message is displayed:
Failed to acquire lock on volume. Please close all applications using volume(s) under replication and try this operation again.
This problem may occur when you try to disable data access to the RVG, creating the Secondary RVG, or when adding new volumes to the RVG. These operations first try to lock all the volumes under RVG. This holds true for both the Primary and Secondary RVG volumes.
This error may also occur when performing the migrate operations. These operations internally try to disable data access to the RVG. These operations also require that no application should use the volumes under replication.
Disabling data access to the RVG, creating the Secondary RVG or adding new volumes operations fails if it is unable to lock the volume because of the following reasons:
If any application or file handles are still open on the volume it cannot be locked
The volume drive letter should not be accessed through any explorer
That drive letter should not be active in the command prompts.
Workaround for avoiding these error messages are as follows:
Ensure that the required volumes are not accessed through any of the Explorer windows or the command prompt. Also ensure that the application handles are closed on these volumes.
Before disabling data access to the RVG the application must be stopped. Ensure that you provide sufficient time for the cached buffers to be flushed before performing these operations.
You can also use the vxrvg dismount command to verify whether disabling or enabling data access succeeds.
In some rare cases, even after closing all the applications which use the replicated volumes, the volume still can't be dismounted because of some system or application problem. In this case, forcefully dismount the volume using the chkdsk /x command. After forcefully dismounting the volumes, the RVG dismount or disable data access succeeds.