MongoDB Deployment Tips on NetApp All-Flash FAS Systems – Part 3

featured_image_mongodb_series

Hey All,

Logwriter here! How are you?

Here we go to Part 3 of MongoDB Deployment Tips on NetApp AFF Systems. At this part I’m going to show you how to restore your entire mongoDB replica set using NetApp Snap Creator Framework.

It’s a beautiful summer day, you’re at your desk playing with MongoDB Compass querying your database when all of sudden your connection to the database hangs and you’re trying to understand what is happening.

part3_server_exploding

Your entire ReplicaSet is gone… and your manager is probably going like this:

part3_make_it_stop

Luckily your database is running on a NetApp AFF System and it takes a snapshot each 15 min with a retention policy of 48 snapshots, which gives you 12 hours of snapshots to look back in the past if you need it. Of course I just put some numbers here, because the number of snapshots available to restore will completely depend on your RPO needs. In this example, your RPO would be 15 min.

After take a deep breath and ask your manager to calm down, you log in to your Snap Creator Framework and starts a restore operation following steps 1 through 3 as indicated by Figure 1.

part3_sc_restore_step00

Figure 1. Starting a Snap Creator Restore Operation.

After you click on “Restore” you will see a screen asking you 5 questions. All questions are listed on Figure 2. Basically, Snap Creator wants to know what volumes do you want to restore, which kind of restore you want to execute and which snapshot you want to use for restore.

Restore type, can be “Volume Restore” where all volume’s content will be reverted to the state as it was when the snapshot was taken. Or it can be “Single File Restore” where you can choose which files/LUNs you want get reverted to the state as it was when the snapshot was taken.

I’m going with “Volume Restore” because my entire ReplicaSet is gone, so I want to revert all my servers to the same point in time.

part3_sc_restore_step01

Figure 2. Providing Snap Creator the information it needs to proceed with a restore.

Then you click “next” and you will see a summary screen as shown by Figure 3.

part3_sc_restore_step02

Figure 3. Snap Creator restore summary screen.

After click “Finish” I have only volume mdb_ntap1_01 as part of the restore job. Snap Creator will ask you if you want to add more volumes to this restore job as shown by Figure 4.

part3_sc_restore_step03

Figure 4. Adding more volumes to the restore job.

Clicking “Yes” and add all volumes that are part of your mongoDB replicaset. In my case here, I have volumes from mdb_ntap1_01 through mdb_ntap1_08, plus the arbiter’s volume mdb_ntap1_arbiter. After you’ve added all your volumes, click “no” and Snap Creator will show you a list of volumes that will be restored by this restore job as shown by Figure 5.

part3_sc_restore_step04

Figure 5. List of volumes that will be restored by the restore job.

Then you click “Ok” and after a few seconds your entire ReplicaSet is restored.

part3_sc_restore_step05

Figure 6. Restore Finished.

You are ready to rescan your LUNs if you will be using the same set of servers to bring your ReplicaSet up or if they were blown up like the gif in the beginning of this post, you can map your LUNs to another set of servers and then bring your Replica Set up and running.

I would like to highlight that the restore process took 25 seconds as you can see at Figure 7 and 8.

part3_sc_restore_log00

Figure 7. Restore has been started at 3:59:26 PM.

part3_sc_restore_log01

Figure 8. Restore was finished at 3:59:51 PM.

 

Figure 9 shows the database size.

part3_sc_restore_show_dbs

Figure 9. MongoDB database size.

So, my ReplicaSet is composed of 1 primary, 1 secondary and 1 arbiter. It means that if my database size is 1TB, the total data restored by Snap Creator was 2TB at 25 seconds. Pretty fast, BOOYAH!!

Please let me know if you have any questions and see you next post.

Thanks for reading it.

Logwriter

Advertisements

One thought on “MongoDB Deployment Tips on NetApp All-Flash FAS Systems – Part 3

  1. Pingback: ONTAP and MongoDB Working Together – Episode 1 | .:: logwriter ::.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s