Skip to main content

Error: "Error obtaining distributed lock" in Google Drive Migrations

This article explains how to diagnose and resolve the "Error obtaining distributed lock" which can occur when migrating data to Google Drive.

This error is closely related to, and often precedes or accompanies, the "Unable to obtain lock for user" error. For troubleshooting the latter, please refer to Error: "Unable to obtain lock for user" in Google Drive Migrations.

 

1. Symptom

During a migration to Google Drive, a user's migration fails, and the logs show the following error message:

Error obtaining distributed lock

This failure prevents items from being transferred for the affected user.

 

2. Cause

To prevent data duplication when migrating shared files, CloudM Migrate uses a "locking" system. It temporarily creates special lock files in the destination by using Google Drive user accounts.

This error occurs when CloudM Migrate attempts to use a destination user account to perform this action, but the chosen account is unable to use the Google Drive API. This is almost always because the user account is either:

  • Suspended in the Google Admin console.

  • Part of an Organizational Unit (OU) where the Google Drive service is disabled.

By default, the tool can attempt to use any user in the destination tenant for this process, so even one suspended user that you are not migrating can cause this issue.

 

3. Resolution

To resolve this error, you must either fix the problematic user accounts in the destination environment or configure CloudM Migrate to only use a specific list of known-good users for the locking process.

 

Option 1: Fix the Destination Environment (Recommended)

This solution ensures the overall health of your destination tenant and prevents the error from recurring.

  1. In the Google Admin console, navigate to Directory > Users.

  2. Review your user list to find and reactivate any suspended users.

  3. Navigate to Apps > Google Workspace > Drive and Docs.

  4. Check the Service status to ensure that Drive is turned ON for all Organizational Units (OUs). If any OUs have the service disabled, you must either enable it or ensure no users reside within them.

Option 2: Limit the Scope of the Locking Mechanism

This particular workaround is especially useful in situations where you are migrating data into a larger, pre-existing Google Workspace environment.

In such scenarios, it may not be feasible to modify the status (e.g., activating or enabling Drive) of all other users in the destination tenant who are not part of the current migration.

  1. In your CloudM Migrate project, navigate to Destination Settings > Transfer and Performance on the configuration page.

  2. Enable the checkbox for Drive Locks From Listed Users.

  3. Save the configuration.

Important: When you enable this setting, you must verify that every user included in your migration list (on the "Users" page of your configuration) is active and has the Google Drive service enabled. The tool will now exclusively use users from this list to manage locks.

After applying either solution, you can re-run the migration for the failed user.

Was this article helpful?
0 out of 1 found this helpful