Error: "Detected existing metadata in cluster <Cluster_MOID>. Run recovery workflow to ensure metadata is in sync" when creating Protection Group in vSAN Data Protection
search cancel

Error: "Detected existing metadata in cluster <Cluster_MOID>. Run recovery workflow to ensure metadata is in sync" when creating Protection Group in vSAN Data Protection

book

Article ID: 424475

calendar_today

Updated On:

Products

VMware Live Recovery VMware vSphere ESXi

Issue/Introduction

  • The VMware Live Recovery (VLR) appliance was redeployed.
  • When creating a new protection group in vCenter(VC) UI, we see an error:

         Detected existing metadata in cluster <Cluster_MOID>. Run recovery workflow to ensure metadata is in sync.

Environment

  • VMware Live Recovery 9.0.5
  • VMware Live Recovery 9.0.4
  • VMware vSAN 9.x

Cause

This issue occurs when redeployed VLR appliance/s fail to sync with vSAN Cluster metadata for previously created Protection Groups.

Resolution

To resolve the issue,follow steps as below:

  1. Take snapshot of VLR appliance before we proceed with below steps.

  2. Find the location of the cluster database file that needs to be recovered. 

    esxcli storage filesystem list
    find /vmfs/volumes/vsan:################-################/ -iname "snapstore.db" 2>/dev/null
  3. Copy Cluster DB that is to be recovered from the vSAN Datastore to newly deployed VLR appliance.
    1. SSH to VLR appliance and copy above stated cluster DB to the location:/opt/vmware/db/snapservice/recovery/

      scp 'root@<esx>:/vmfs/volumes/vsan:################-################/########-####-####-####-############/snapstore.db' /opt/vmware/db/snapservice/recovery/snapstore.db

      Note: Create this path if it does not exist : mkdir -p /opt/vmware/db/snapservice/recovery/

    2. Update folder permission created under /opt/vmware/snapservice/data/recovery/

      chmod -R 777 /opt/vmware/db/snapservice/recovery/

  4. Locate recovery script recovery.py :

    cd /opt/vmware/snapservice/api_scripts

  5. Perform Recovery of VLR appliance:

    python recovery.py -c 'domain-##' --vcUser '[email protected]' -f /opt/vmware/db/snapservice/recovery/snapstore.db

    (-c is cluster MoID of cluster for which the Protection Group creation fails. This is the same MoID that is observed in the error message above. 
    Select the cluster in vSphere Client and check URL to get Moid that is in format --> 'domain-c##'.)

  6. On successful execution of the above command, the output will look as below:

    Please enter the vCenter password:
    VC IP: <vcenter_ip_or_fqdn>:443
    Invoking recovery API
    API response : <Response [202]>
    Waiting for task to complete

    {'cancelable': False, "description': {'args': [], 'default_message': 'Cluster DB recovery task', 'id': 'com.vnware.vsan.snapservice.RecoverDB'}, 'end_time': 'YYYY-MM-DDTHH:MM:SS.MSZ', "operation':
    'recover', 'progress': {'completed': 0, 'message': {'args': [], 'default_message': 'Cluster DB recovery task', 'id': 'com.vmware.vsan.snapservice.RecoverDB'}, 'total'; 180}, 'result': None, 'service': 'com.vmware.snapservice_internal.clusters', 'start_time': 'YYYY-MM-DDTHH:MM:SS.MSZ', 'status': 'SUCCEEDED", 'target': {'id': "domain-cXX', 'type': 'ClusterComputeResource'}, "user': '[email protected]'}

  7. Repeat this process for the other site VLR appliance.

  8. Create new Protection Group as per Create a vSAN Data Protection Group