Skip to main content

Error: "Unable to obtain lock for user" in Google Drive Migrations

This article explains how to diagnose and resolve the "Unable to obtain lock for user" error, which can occur when migrating data to Google Drive using CloudM Migrate.

 

1. Symptom

During a migration to Google Drive, an individual user's migration fails. The CloudM Migrate logs display the following error message:

Unable to obtain lock for user

This error prevents any further items from being transferred for the affected user.

 

2. Cause

CloudM Migrate uses a locking system to prevent data duplication when migrating shared files to Google Drive. This system creates temporary "lock files" in a Google Drive user's account, which signal that a file is currently being migrated.

This error usually happens for two main reasons:

  • Too Many Permissions on Source Files: If source Google Drive files have many individual permissions (rather than grouped permissions), CloudM Migrate might try to lock too many items at once using the same user.
  • Destination User Issues: CloudM Migrate needs to use active destination users with Google Drive enabled to create these lock files. If any destination user is suspended, renamed, deleted, or if Google Drive is disabled for an Organizational Unit (OU), the locking process can fail, leading to an "Error obtaining distributed lock." error - see Error: "Error obtaining distributed lock" in Google Drive Migrations.

When either of these issues occurs, CloudM Migrate tries multiple times (by default, 20 attempts) to perform a lock. If it reaches this limit, the migration fails with the "Unable to obtain lock for user" and "Retry Count Exceeded" (specific to obtaining lock) errors.

 

3. Resolution

To resolve this specific error, increase the Lock retry count in your CloudM Migrate project settings.

Steps to Increase Lock Retry Count:

  1. In your CloudM Migrate project, navigate to Destination settings.
  2. Select the Transfer and performance tab.
  3. Locate the Lock retry count setting.
  4. Increase the value of the Lock retry count.
  5. Save the configuration.
  6. Retry the migration for the affected user.

Note: It's impossible to definitively quantify the exact number of retries required. We recommend an initial setting of 50 or 100. While increasing this value may slow down the migration process, it significantly reduces the likelihood of the issue reoccurring.

 

4. Proactive Issue Identification with Environment Scan

To help identify potential issues related to source user accounts and Drive permission sets before starting your migration, consider utilizing the CloudM Migrate Environment Scan feature. Running an environment scan can help highlight such problems beforehand, allowing you to address them proactively.

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