How to encrypt drives on live SQL Server with AlwaysOn

To encrypt drives for AlwaysOn, I would suggest these steps:

  1. – Do encryption during low usage hours.
  2. – encrypt drives on SECONDARY first. Without taking AlwaysOn offline. Do this during a low usage time slot.
  3. – Do one drive at a time.
  4. – Give a bit of time for IO to catch up. I’d wait 10-15 minutes after each drive encryption completes before starting a new one. This maybe over kill. But maybe not, since we are doing this on live PRODUCTION.
  5. – Repeat the same steps PRIMARY AlwaysOn node.

To encrypt drives on PRIMARY, you have few options.

Option 1

Failover AlwaysOn to SECONDARY, and encrypt drives then. Just as described above.

Option 2

I don’t think AlwaysOn failover is a must for drive encryption.

It may be safe to simply encrypt on PRIMARY.

Just pay attention to the latencies of SQL operations. And how long SPIDs are taking

Start with the smallest drive or least active drive.

I think there may get a good chance this will go fairly unnoticed to SQL.

Option 3

Encrypt volumes on SECONDARY.

Then set AlwaysOn to asynchronous commit (currently it’s in Synchronous). Perform steps are described above.

When complete, set AlwaysOn back to synchronous commit.

Your workload is quite heavy. On some days, your PRIMARY is spewing out 800MB worth of logs in 5min.

So if PRIMARY gets affected for too long – there is a good chance this will cause issues.

AlwaysOn Dashboard.

Use it to make sure AlwaysOn is good.

There you can see AlwaysOn in two statuses:

  1. Synchnronizing – which means, if you failover, you may have data loss. And there is no auto-failover at this point.
  2. Synchronized – which means both replicas are caught up. All good. And auto-failover is ready to kick in if needed.

And if you are trying to encrypt *all* drives for compliance with SOC2 or similar regulation and need to encrypt quorum drives – you can. Nothing special about this drive.

I would just encrypt without any special steps.

Let’s get on the call, and we will walk you through how we will keep your database safe and answer any question you have.

Jose

Jose

I am an Enterprise SQL Server Database Administrator with 10+ years of experience working with complex transactional environments.

Leave a Reply

Your email address will not be published. Required fields are marked *

Call Us Now

Or, Let Us Know How We Can Help

Tight On Time?

Schedule A Call: