0

Ansible for SQL Server DBAs. Available Now!

Header Logo
Blog DBA Challenges
Courses
Automated Sandbox Framework Ansible for SQL Server DBAs: Level 1
Log In
← Back to all posts
Connect
Share to…
Share

#009 Build a Windows Server Failover Cluster - Part 5

by Luke Campbell
Oct 05, 2024

Last week, you finished adding the shared storage. 

We'll complete the cluster build this week in preparation for the SQL Server installation.  There's a twist, though.  Instead of using your domain admin credentials (the admin_* account you created in challenge 004) to build the cluster, we'll use our standard user account that was added as a local admin on each node.  You'd likely encounter this situation when building clusters within a production environment.

This challenge has seven objectives.

  • Create the Cluster Network Object (computer account) in Active Directory.
  • Disable the CNO in AD.
  • Grant full control permissions to the user you'll use to create the cluster (your non-domain admin account).
  • Create the cluster and review any warnings.
  • Set the CNO to use a static IP address
  • Add storage 
  • Configure quorum

 

 

If you're using Vagrant, go ahead and spin up your lab using "vagrant up".  

Ready?


Estimated time to complete: Less than 4 hours.


Step 1: Create the Cluster Network Object  in Active Directory

We're going to pre-stage the CNO in AD to avoid any permissions issues that we would otherwise encounter.  

Log on to your domain controller, DC1, using your admin_* credentials.  This is a step that would typically be completed by the systems admin.

  1. Open Active Directory Users and Computers.
  2. Select the Computers container.  If you're building the cluster within an OU (organizational unit), you have other permissions to consider.  But, in our simple example, we won't cover those.  Check here for more information.
  3. Right-click on Computers, select New, and then Computer.
  4. Type "CLUSTER1" in the computer name and then click ok.

 

Step 2: Disable the CNO

You may be asking why we are disabling the object we just created.  Fair question.  It must be disabled so that the creation process can ensure the object is not already in use when you create the cluster.  

Right-click on CLUSTER1 and choose disable.  

Step 3: Grant User Permissions to Create the Cluster

You'll grant your standard user account full control permissions on the CNO in this step.  But first, you'll need to enable the Advanced Features menu within Active Directory Users and Computers.

Click View and then make sure Advanced Features is selected.

Next, right-click on CLUSTER1 and select properties.  We're going to change two things;

  1. Click on the Object tab and check the box next to "Protect object from accidental deletion."
  2. Next, click on the Security tab and click Add.  Find your standard user account and click ok (mine is Luke without the admin_ prefix).
  3. With the user selected, grant the Full Control permission.  Click Ok.

 

Step 4: Create the Cluster and Review any Warnings

You'll need to install the Failover Cluster feature and management tools on CLUSTER1SRV1 and CLUSTER1SRV2.  We're going to take a shortcut here and use PowerShell.

Login to CLUSTER1SRV1 and CLUSTER1SRV2, using your standard account, and open PowerShell as an admin.

Run "Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools".  Restart if required.

Open Server Manager on CLUSTER1SRV1, click tools and then select Failover Cluster Manager. 

  1. Click Create Cluster (in the middle of the screen under Management).  This will start the Create Cluster Wizard.
  2.  Click next.  Enter CLUSTER1SRV1, click add, then repeat the process for CLUSTER1SRV2.
  3. Click next (there are easier and faster methods for doing this, but seeing it manually first is helpful).
  4. Leave "Yes. When I click Next, run configuration validation tests, and then return the process of creating the cluster." selected.  Click next.
  5. Click next (again).
  6. On the Testing Options screen, choose "Run only tests I select."  Click next.
  7. Review Inventory, Network, Storage, and System Configuration to understand which tests are being performed.  Don't change anything, but I thought getting familiar with these would be a good idea.  Click next whenever you're ready.
  8. Click next (again).  Validation will begin.  If everything has been set up correctly, you should receive all green checks (unless an update has snuck in and only been applied to one of the nodes).  This step takes a few minutes.
  9. Click View Report.  The report should open in a browser window.  Review any warnings or errors and address those.  If all you see are green checkmarks, click finish.
  10. Cluster Name - Enter CLUSTER1.  Click Next.
  11. Uncheck "Add all eligible storage to the cluster."  We'll do this manually to avoid the wizard adding storage that we don't intend to add. 
  12. Click next.  This step takes a few seconds.  Notice that the IP address is using a DHCP address.  You'll fix that soon.  Click Finish.

 

Jump back on your domain controller, DC1, and look at the CLUSTER1 object.  It should now be enabled (refresh the view in Active Directory Users and Computers).

Step 5: Set the CNO to Use a Static IP Address

We don't want the IP address changing.  Let's fix that now.

Back on CLUSTER1SRV1, open Failover Cluster Manager.

Select your new cluster on the left (if it hasn't already been selected).

In the middle of the screen, you'll see Cluster Core Resources.  Expand Name, and then you'll see the IP Address: YourIpHere resource.

  1. Right-click on IP Address and select properties.
  2. Choose Static IP Address and then provide an address.  This should be an address that falls outside of your DHCP range.  For me, that's any available address occurring before 192.168.88.128.  I'll assign 192.168.88.7.  
  3. You'll get an informational box stating the change was stored, but not all changes will take effect until the IP Address resource is taken offline and then online again.  Go ahead and do that now.

Step 6: Add Storage

Now, we'll add storage.

While you're still in Failover Cluster Manager, expand Storage and then right-click on Disks.

  1. Click Add Disk.
  2. Review the list of available disks.  You should see the 4 disks we created previously.  Click ok.

You should now see that all disks are online and belong to CLUSTER1SRV1.

Perfect.  You're almost finished.

Step 7: Configure the Disk Witness

Click on CLUSTER1 on the left menu.  You'll notice that we don't currently have a witness configured.  Remember, we need an odd number of votes in the cluster to break ties.  Currently, we have two.  Let's set up the witness for the third vote.

  1. Right-click CLUSTER1, select More Actions and then choose Configure Cluster Quorum Settings.
  2. Click next.  Select "Select the quorum witness" and then click next.
  3. Choose "Configure a disk witness."  Then, click next.
  4. Select the correct disk (Q:).  For me, this was cluster disk 3.
  5. Click next (argh, click ops).
  6. Click next a couple of times and then click Finish.

You should now see Witness: Cluster Disk 3 under the summary.  Under Cluster Core Resources, you'll see Cluster Disk 3 under Storage.

Helping Others and Sharing Your Results

That's it for this week.  Spend some time taking a look around and failing over your new cluster.  In the next challenge, we'll start installing SQL Server.  However, my family and I will be taking fall break next week, so I may skip next week's challenge (extra time for you to get familiar with the cluster).

If you have tips other readers can learn from, please share them in the comments.  You can message me on LinkedIn or post about it and tag me with the #dbachallenges hashtag.

Feedback

If there's a DBA Challenge you'd like to see, let me know by replying to this email.  

P.S.  If you're a DBA managing 10s or 100s of instances and feeling overwhelmed, I’d love your input on a few quick questions:

 1. What’s your biggest frustration with managing SQL Server?

 2. What concerns you most about automation?

 3. Where do you need the most support in automating SQL Server management?

 4. What would the ideal solution be if you could solve these issues?

Lastly, I've released a presale offer for Ansible for SQL Server DBAs: Level 1.  It includes a few bonuses for registering early and is limited to 10 spots.  However, this course isn't for everyone.

Who Should Not Enroll?

  • Those Unwilling to Commit: If you're not ready to invest time and effort, this course isn't the right fit.
  • Looking for Quick Fixes: This program requires dedication and application, not a passive approach.

How to Secure Your Spot.

  1. Enroll Today: Click the link below to secure your spot in this exclusive pre-sale offer.
  2. Watch Your Email: You'll be notified as the modules and bonuses are released.

Click Here to Enroll Now

Feel free to reply to this email and share your thoughts anytime—I’m all ears!

Good luck, and I look forward to seeing your results!

Luke

Responses

Join the conversation
t("newsletters.loading")
Loading...
#016 Leveraging Ansible Variables to Configure Lock Pages in Memory
You've probably seen it happen.  During peak load on a SQL Server instance, the operating system occasionally pages out parts of SQL Server's memory to disk, causing performance slowdowns.  And you've probably read how Lock Pages in Memory can help address this issue.   Granting this user right can be time-consuming and error-prone when done manually especially if you need to grant the permissi...
#015 Introduction to the Automated Sandbox Framework
2025 is just around the corner, and it's shaping up to be an exciting year for DBAs.  With Windows Server 2025 already here and SQL Server 2025 on the horizon, there's no better time to sharpen your skills and prepare for what's ahead. This year, I've focused on solving a common challenge for DBAs: how to quickly and consistently build test environments for learning and experimentation. In mid-...
#014 Introduction to the Enterprise Policy-Based Management Framework
It's been a few weeks since the last edition.  Life happens--between releasing Ansible for SQL Server DBAs, celebrating Thanksgiving, preparing for Christmas, and juggling the day-to-day demands of being a full-time consultant, it's easy to feel stretched thin.  Have you ever felt that way? But here's a question:  Are we just staying busy or moving toward our goals (we like to think so)?  Are o...

DBA Challenges

Helping you become a more efficient SQL Server Database Administrator through real-world challenges and automation.
Footer Logo
Policies Contact
© 2025 AUTOMATESQL LLC

Five Steps to Spot Automation Opportunities

Wondering if that task you're working on should be automated?  With your free Time Tracker Excel workbook, you're able to easily track and analyze how you spend your time throughout the day.

 

When you signup, we'll send you periodic emails with additional free content. Unsubscribe anytime.