Everpure Fusion

Expanding a MongoDB Replica Set with Everpure Fusion

So far in this series I’ve been rebuilding members on arrays I already had. In my reseed post, I rebuilt aen-mongo-06 from a replicated snapshot of the primary. This time I wanted to grow the replica set onto a fourth array. That’s usually where you open a storage ticket, wait for someone to pick an array and carve some volumes, and then start an initial sync that copies every document over the network. Two waits, and the second one gets longer every time your database grows.

When You Need fsyncLock: Restoring a MongoDB Replica Set from Local Snapshots on Every FlashArray

In my reseed post, I spent a lot of time convincing you that you don’t need fsyncLock. One crash-consistent snapshot of the primary, replicated to every array, rebuilt every secondary in the set, under load, with no pause in writes. That’s still what I reach for when I’m rebuilding members.

If you need more granularity around a recovery point, then you’re going to have to use fsyncLock.

In this post, I’m going to show you how I freeze the primary for writes for a few seconds, snapshot all three arrays, and restore every member back to the exact document count I recorded under the lock. Then I’ll show you what happened when I ran the same test without the write lock, because it came back consistent, just not at a point I chose. There are some subtle nuances around the recovery point when you use app consistent snapshots with fsyncLock and when you use crash consistent snapshots. We’ll dive into those here. Let’s go.

Replacing the MongoDB Replica Set Initial Sync with FlashArray Snapshots

In my last post, I restored every member of a replica set from one snapshot on the same array. In real life, you usually lose one member: a host dies, someone rebuilds the wrong VM, a member’s data gets damaged. And each member of a replica set is most likely on a different array. MongoDB rebuilds a member from nothing with an initial sync, the job every DBA dreads, and I wanted to see how much of that job I could hand off to the storage tier.

Snapshot Recovery of a MongoDB Replica Set on a Single FlashArray

I’ve been running MongoDB on Everpure FlashArray in my lab, and the first thing I wanted to prove is the simplest one. Can I snapshot an entire replica set while it’s taking writes, drop a database, and get everything back?

In this post, I’m going to show you that: a three-member replica set, one mongod per node, every member on volumes from the same FlashArray, with the database processing a write workload during the snapshot, and no fsyncLock. If you’ve read my intro to this series, this is the first hands-on post.

Why Run MongoDB on Everpure FlashArray?

I’ve spent a lot of years around SQL Server on shared storage, and lately I’ve been spending that time with MongoDB. The database engine couldn’t be more different, but the storage conversation sounds very familiar. How do I protect it? How do I grow it? How do I get another copy of it somewhere else, and how long is all of that going to take?

This is the first post in a series where I run MongoDB replica sets and sharded clusters on Everpure FlashArray in my lab, with the commands and the real output in every post. In this post, I’m going to show you why you’d run MongoDB this way at all: what MongoDB asks of storage, where disks inside every node start to hurt, what changes when the volumes come from a FlashArray, and a map of the rest of the series. There’s no lab output in this one, just the reasoning. Let’s go.