Skip to main content
Druva Documentation

How to recreate a blank storage?

Overview

Recreating a blank storage clears all the data and acts as a fresh storage but has the same properties as it had initially with users still pointing to it.

Note: This would trigger a full backup for the users belonging to this storage and same has to be informed to the customer prior to performing these steps.

This article addresses the following scenarios:

  • Recreating a blank storage when there are minimal chances of getting the storage back to a healthy status.
  • Customer wants to migrate to another server, without moving the user data.
  • To move users from unhealthy or irrecoverable storage to a new storage and the movement is failing due to some issues.
  • To recreate primary storage from HA (High Availability) incase of corruption; however, additional steps are required to reset the seeding

Note: Do not use this article to create secondary storage. For secondary storate, the only option would be to delete the storage and recreate the secondary storage and its associtaed HA policy. 

Recreating blank storage

  1. Stop all the Druva inSync Master services along with the storage node services if applicable.
  2. Open the Task Manager on the Master & Node servers and end any inSync tasks, if found pending.
  3. Rename the following folders to .Old for the storage to be recreated:
    __bynamodata__ 
    __bynamolog__
    __bynamodb__ 
  4. Take a dump of inSyncConfigDB.
  5. Connect to the inSyncConfigDB and set the following column values for the Storage to '0'.
    Ready = 0
    Mount_Gen = 0
  6. Start all the inSync Master services and check if the storage is healthy. If healthy, perform the remaining steps.
  7. Stop all the inSync Master services.
  8. Change the value for "FORCE_FULLSCAN" in the inSyncServer.cfg to 1 (which is True).
  9. Start all the inSync Master services.
  10. Delete the .Old folders, after verifying whether one complete backup is done for all devices.

Resetting seeding

Note: Perform these steps only when you face issues with the primary storage, which is a part of the HA Policy.

  1. Connect to inSyncDbgConsole.exe.
    C:\Program Files\Druva\inSync Server>inSyncDbgConsole.exe server
  2. Import the following modules and run the following one-by-one:
    from inSyncLib import inSyncConfigDB
    from inSyncLib import inSyncUser
    inSyncConfigDB
    inSyncUser.Device
  3. Get the details of the Storage and Device by the following scripts one-by-one and change the "DeviceID" and "StorageID" by appropriate value.
    inSyncUser.Device.get(DeviceID) 
    inSyncConfigDB.Storage.get(StorageID)
    st=inSyncConfigDB.Storage.get(StorageID)
    st.scookie
  4. Run the following one-by-one using appropriate space as listed below and change the StorageID with the appropriate value without using qoutes (''). Make sure to use tab to provide appropriate space before each script. 
    for u in inSyncUser.User.select():
            if u.storageID == 'StorageID':
                 for d in inSyncUser.Device.selectBy(userID=u.id):
                          if d.hastatus == False:
                                  d.set_devicecookie(Tasks.getStorageCookie('StorageID'))

     
  5. Run the following to check the HAStatus for a Device and change the DeviceID with appropriate ID.
    inSyncUser.Device.get(DeviceID)