HPE Storage Tech Insiders
cancel
Showing results for 
Search instead for 
Did you mean: 

NimbleOS 4 Use Case: Accelerate Exchange Mailbox Recovery with Nimble Clones

dgonzalez59

In my past couple of blog posts, I covered leveraging the Nimble Windows Toolkit version 4 (NWT4), to quickly create clones of SQL Server databases, using new functionality like host level cloning automation provided by included PowerShell cmdlets, or querying application metadata stored as part of VSS enabled snapshots. But, these enhancements don't just benefit SQL Server. I can use the same workflows to clone Exchange databases as well. For example, I can use Exchange database clones to quickly create a Recovery Database, allowing me to accelerate individual restore requests that fall outside of the configured deleted items retention period, improving my SLAs for data recovery. By using NWT4, I can initiate these clones from the appropriate Exchange host, without involving storage administrators as part of the restore process. Let's take a closer look at this type of workflow.

 

Exchange Mailbox Recovery with Nimble Clones:

This workflow is broken down into four parts:

(1) Identify the snapshot collection that will be used to create the database clone;

(2) Clone and mount database volumes to the Exchange server;

(3) Create the Recovery Database and execute the appropriate item or mailbox level restore;

(4) Clean up.

Identifying the Snapshot Collection used for the Exchange Database clone:

With NWT4, I can easily identify the appropriate snapshot collection to use for my Exchange database clone by using the VSS application metadata stored with the snapshot as the base of my query. To display the a list of available snapshot collections, I can use the the "-MaxObjects" parameter. A value of one uses the latest snapshot collection. A value greater than one displays the recent number of collections, in order from most recent. I will be leveraging the "-AppObject" parameter to identify the database for which I want snapshot collection information. Once I know the snapshot collection I would like to clone from, I can use that information with the "InvokeCloneNimVolumeCollection" cmdlet, that will automatically create volume clones and mount the clones to the Exchange Server. The workflow will be executed from the Exchange server that holds the active mailbox database copy that I need to clone.

Identifying the Appropriate Snapshot Collection

# Use the Get-NimSnapshotCollection cmdlet to get the latest snapshots for my Exchange database. I will chose the most recent snapshot collection before the data loss. #

$> Get-NimSnapshotCollection -AppObject "test_db_nwt4" -MaxObjects 5

GroupMgmtIP : 192.168.35.26

Name : master-exch-db-hourly-2017-05-16::10:00:22.054

VolumeCollectionName : master-exch-db

CreationTime : 5/16/2017 10:00:22 AM

Snapshots : {master-exch-db-hourly-2017-05-16::10:00:22.054, master-exch-db-hourly-2017-05-16::10:00:22.054}

GroupMgmtIP : 192.168.35.26

Name : master-exch-db-hourly-2017-05-16::09:00:21.678

VolumeCollectionName : master-exch-db

CreationTime : 5/16/2017 9:00:21 AM

Snapshots : {master-exch-db-hourly-2017-05-16::09:00:21.678, master-exch-db-hourly-2017-05-16::09:00:21.678}

 

GroupMgmtIP : 192.168.35.26

Name : master-exch-db-hourly-2017-05-16::08:00:21.567

VolumeCollectionName : master-exch-db

CreationTime : 5/16/2017 8:00:21 AM

Snapshots : {master-exch-db-hourly-2017-05-16::08:00:21.567, master-exch-db-hourly-2017-05-16::08:00:21.567}

 

GroupMgmtIP : 192.168.35.26

Name : master-exch-db-hourly-2017-05-15::20:00:21.562

VolumeCollectionName : master-exch-db

CreationTime : 5/15/2017 8:00:21 PM

Snapshots : {master-exch-db-hourly-2017-05-15::20:00:21.562, master-exch-db-hourly-2017-05-15::20:00:21.562}

 

GroupMgmtIP : 192.168.35.26

Name : initial

VolumeCollectionName : master-exch-db

CreationTime : 5/15/2017 7:59:17 PM

Snapshots : {initial, initial}

Cloning and Mounting the Exchange Database Volumes:

 

After identifying the most recent snapshot collection before the point of data loss, I can move forward with creating clones of the database volumes. I will use the name of the snapshot collection ("-SnapshotCollectionName"), as well as the volume collection ("-VolumeCollectionName"), with the "InvokeCloneNimVolumeCollection" cmdlet. The values for both parameters are listed in the output of the "Get-NimSnapshotCollection" command as shown above. I will also connect the volumes, provide a custom suffix for my volume clones ("-Suffix), and assign access paths ("-AccessPath") as part of the same command.

Cloning and Mounting Exchange Database Volumes

# Creating volume clones and mounting clones to Exchange server #

$> Invoke-CloneNimVolumeCollection -SnapshotCollectionName "master-exch-db-hourly-2017-05-16::08:00:21.567" -VolumeCollectionName "master-exch-db" -Suffix "-dbrecovery" -AccessPath "c:\Recoverydb\db","C:\Recoverydb\tl"

 

DeviceName : \\.\physicaldrive3

SerialNumber : 44867277635d0d396c9ce9008b7f40ca

GroupManagementIP : 192.168.35.26

NimbleVolumeName : master-exch-db1-dbrecovery

DiskSize : 52428127.5

BusType : iScsi

WindowsVolumes : {C:\Recoverydb\db\}

FCTargetMappings : {}

Clone : True

Snapshot : False

BaseSnapshotName : master-exch-db-hourly-2017-05-16::08:00:21.567

ParentVolumeName : master-exch-db1

 

DeviceName : \\.\physicaldrive4

SerialNumber : fb94d7821412a0066c9ce9008b7f40ca

GroupManagementIP : 192.168.35.26

NimbleVolumeName : master-exch-tl1-dbrecovery

DiskSize : 20964825

BusType : iScsi

WindowsVolumes : {C:\Recoverydb\tl\}

FCTargetMappings : {}

Clone : True

Snapshot : False

BaseSnapshotName : master-exch-db-hourly-2017-05-16::08:00:21.567

ParentVolumeName : master-exch-tl1

Creating the Recovery Database and Executing the Restore:

 

Now that my database volumes have been cloned and mounted to the Exchange server, I can go ahead and create my Recovery Database. To create the Recovery Database, I will need to first create the configuration for the database using the "New-MailboxDatabase" cmdlet, using the files in my cloned volumes. I will then ensure the database is in a "Clean Shutdown" state before mounting it to the Exchange server. After the database is successfully mounted, I will execute my restore request. The following commands were run from the Exchange Management Shell.

Creating the Recovery Database

# Adding the Recovery Database to the configuration. Using custom locations for database and log files. The following set of commands are run from the Exchange Management Shell #

$> New-MailboxDatabase -Server master -Name RecoveryDB -Recovery -EdbFilePath "C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb" -LogFolderPath "C:\Recoverydb\tl\test_db_nwt4\"
WARNING: Recovery database 'RecoveryDB' was created using existing file C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb.
The database must be brought into a clean shutdown state before it can be mounted.

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
RecoveryDB                     MASTER            True               None

WARNING: Please restart the Microsoft Exchange Information Store service on server MASTER after adding new mailbox databases.

 

# Checking the status of the database #

$> eseutil.exe /mh "C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb"

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 15.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode...
         Database: C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb

.....

DB Signature: Create time:05/15/2017 23:56:11.394 Rand:3807340063 Computer:

         cbDbPage: 32768

           dbtime: 3043 (0xbe3)

            State: Dirty Shutdown

     Log Required: 4-55 (0x4-0x37)

    Log Committed: 0-56 (0x0-0x38)

   Log Recovering: 0 (0x0)

   Log Consistent: 4 (0x4)

......

Operation completed successfully in 0.265 seconds.

# Performing a soft recovery #

$> eseutil /r E00 /l "C:\Recoverydb\tl\test_db_nwt4\" /s "C:\Recoverydb\tl\test_db_nwt4\" /d "C:\Recoverydb\db\test_db_nwt4\"

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 15.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating RECOVERY mode...
    Logfile base name: E00
            Log files: C:\Recoverydb\tl\test_db_nwt4\
         System files: C:\Recoverydb\tl\test_db_nwt4\
   Database Directory: C:\Recoverydb\db\test_db_nwt4\

Performing soft recovery...
                      Restore Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................

Operation completed successfully in 1.484 seconds.

# Checking status of database after recovery #

$> eseutil.exe /mh "C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb"

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 15.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode...
         Database: C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb

.....

DB Signature: Create time:05/15/2017 23:56:11.394 Rand:3807340063 Computer:

         cbDbPage: 32768

           dbtime: 45109 (0xb035)

            State: Clean Shutdown

     Log Required: 0-0 (0x0-0x0)

    Log Committed: 0-0 (0x0-0x0)

   Log Recovering: 0 (0x0)

   Log Consistent: 0 (0x0)

.....

Operation completed successfully in 0.265 seconds.

 

# Mounting recovery database #

$> Mount-Database -Identity "RecoveryDB"

 

# Execute restore operation. In this case, I will restore the mailbox for user "User, Test." #

$> New-MailboxRestoreRequest -SourceDatabase "RecoveryDB" -SourceStoreMailbox "User, Test" -Name TestUserRestore -TargetMailbox "User, Test" -AllowLegacyDNMismatch

Name            TargetMailbox                                     Status
----            -------------                                     ------
TestUserRestore rtpdemo.rtplab.nimblestorage.com/Users/User, Test Queued

Post-Restore Clean Up:

Once the mailbox restore request completes, the only steps left are to remove the Recovery Database, disconnect cloned volumes from the Exchange Server, and delete the cloned volumes from the array. The new NWT4 cmdlet "Remove-NimVolume" allows me to automate the last two steps, and like previous cmdlets in this workflow, the amount of array knowledge required is minimal. I will be leveraging the "-NimbleVolumeAccessPath" parameter to identify the volumes that I would like to offline and disconnect from the server, as well as delete from the array. Three simple commands, and my clean up is done!

Cleaning Up

# Detach and remove Recovery Database. The following commands are executed from the Exchange Management Shell #

$> Dismount-Database -Identity RecoveryDB

Confirm
Are you sure you want to perform this action?
Dismounting database "RecoveryDB". This may result in reduced availability for mailboxes in the database.
Yes  Yes to All  No  No to All  [?] Help (default is "Y"): A

$> Remove-MailboxDatabase -Identity RecoveryDBConfirm
Are you sure you want to perform this action?
Removing mailbox database "RecoveryDB".
Yes  Yes to All  No  No to All  [?] Help (default is "Y"): A
WARNING: The specified database has been removed. You must remove the database file located in
C:\Recoverydb\db\test_db_nwt4\test_db_nwt4.edb from your computer manually if it exists. Specified database: RecoveryDB

# Using NWT4 cmdlets to disconnect cloned volumes, then offline and delete cloned volumes from the array. These cmdlets are executed outside of the Exchange Management Shell #

$> Remove-NimVolume -NimbleVolumeAccessPath "c:\Recoverydb\db","c:\Recoverydb\tl"

Final Thoughts:

With NWT4, I was able to accomplish the workflow in this blog in a matter of minutes thanks to the new automation available through our cmdlets. But, there is more to see! For more information on NWT4 or other use cases, please be sure to check out my other blog posts:

NOS4 Use Case: Rapid Deployment of SQL Developer Containers with Nimble Storage

NOS4 Use Case: Leveraging NWT4 cmdlets for SQL Server Reporting or Dev/Test Workflows

Also, be sure to check out Anagha's blog post on the NWT4 cmdlets:

The “Power” of PowerShell cmdlets in Nimble Windows Toolkit 4.0

0 Kudos
About the Author

dgonzalez59

Events
See posts for dates
See posts for locations
HPE at 2018 Technology Events
Learn about the technology events where Hewlett Packard Enterprise will have a presence in 2018.
Read more
See posts for dates
Online
HPE Webinars - 2018
Find out about this year's live broadcasts and on-demand webinars.
Read more
View all