Skip to content

Commit 3b3c280

Browse files
AttinderPalSinghrwestMSFT
authored andcommitted
Document Pacemaker HA agent v2 for SQL Server 2025
Revise Pacemaker HA agent documentation for clarity Updated the documentation for creating availability groups in Pacemaker, including changes to the Pacemaker HA agent v2 and its benefits. Clarified instructions for creating resources and managing upgrades. Added information about the new Pacemaker HA agent v2 for SQL Server 2025, including its features and usage instructions.
1 parent 81b3a58 commit 3b3c280

1 file changed

Lines changed: 45 additions & 28 deletions

File tree

docs/linux/sql-server-linux-create-availability-group.md

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create and Configure an Availability Group for SQL Server on Linux
33
description: This tutorial shows how to create and configure availability groups for SQL Server on Linux, as well as create availability group endpoints and certificates.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: 01/02/2026
6+
ms.date: 03/19/2026
77
ms.service: sql
88
ms.subservice: linux
99
ms.topic: install-set-up-deploy
@@ -319,7 +319,7 @@ This section shows how to create an AG with a cluster type of External using SSM
319319

320320
1. On the Introduction dialog, select **Next**.
321321

322-
1. In the Specify Availability Group Options dialog, enter a name for the availability group, and select a cluster type of `EXTERNAL` or `NONE` in the dropdown list. Use `EXTERNAL` when you deploy Pacemaker. Use `NONE` for specialized scenarios, such as read scale-out. Selecting the option for database level health detection is optional. For more information on this option, see [Availability group database level health detection failover option](../database-engine/availability-groups/windows/sql-server-always-on-database-health-detection-failover-option.md). Select **Next**.
322+
1. In the **Specify Availability Group Options** dialog, enter a name for the AG, and select a cluster type of `EXTERNAL` or `NONE` in the dropdown list. Use `EXTERNAL` when you deploy Pacemaker. Use `NONE` for specialized scenarios, such as read scale-out. Selecting the option for database level health detection is optional. For more information on this option, see [Availability group database level health detection failover option](../database-engine/availability-groups/windows/sql-server-always-on-database-health-detection-failover-option.md). Select **Next**.
323323

324324
:::image type="content" source="media/sql-server-linux-create-availability-group/image3.png" alt-text="Screenshot of Create Availability Group showing cluster type." lightbox="media/sql-server-linux-create-availability-group/image3.png":::
325325

@@ -478,11 +478,11 @@ This example shows three full replicas and how you can configure read-only routi
478478

479479
A few things to note about this configuration:
480480

481-
- `AGName` is the name of the availability group.
482-
- `DBName` is the name of the database that you use with the availability group. It can also be a list of names separated by commas.
481+
- `AGName` is the name of the AG.
482+
- `DBName` is the name of the database that you use with the AG. It can also be a list of names separated by commas.
483483
- `ListenerName` is a name that's different from any of the underlying servers or nodes. It's registered in DNS along with `IPAddress`.
484484
- `IPAddress` is an IP address that's associated with `ListenerName`. It's also unique and not the same as any of the servers or nodes. Applications and end users use either `ListenerName` or `IPAddress` to connect to the AG.
485-
- `SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
485+
- `SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
486486

487487
1. In a query window connected to the other replica, execute the following statement to join the replica to the AG and initiate the seeding process from the primary to the secondary replica.
488488

@@ -542,13 +542,13 @@ This example shows the creation of a two-replica configuration using a cluster t
542542

543543
In this example:
544544

545-
- `AGName` is the name of the availability group.
546-
- `DBName` is the name of the database that you use with the availability group. It can also be a list of names separated by commas.
545+
- `AGName` is the name of the AG.
546+
- `DBName` is the name of the database that you use with the AG. It can also be a list of names separated by commas.
547547
- `PortOfEndpoint` is the port number used by the endpoint you create.
548-
- `PortOfInstance` is the port number used by the instance of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
548+
- `PortOfInstance` is the port number used by the instance of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
549549
- `ListenerName` is a name that's different from any of the underlying replicas but isn't actually used.
550550
- `PrimaryReplicaIPAddress` is the IP address of the primary replica.
551-
- `SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
551+
- `SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
552552

553553
1. Join the secondary replica to the AG and initiate automatic seeding.
554554

@@ -564,12 +564,13 @@ This example shows the creation of a two-replica configuration using a cluster t
564564

565565
## Create the SQL Server login and permissions for Pacemaker
566566

567-
A Pacemaker high availability cluster that uses [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux needs access to the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] instance, and permissions on the availability group itself. These steps create the login and the associated permissions, along with a file that tells Pacemaker how to log into [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
567+
A Pacemaker high availability cluster that uses [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux needs access to the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] instance, and permissions on the AG itself. These steps create the login and the associated permissions, along with a file that tells Pacemaker how to log into [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
568568

569569
1. In a query window connected to the first replica, execute the following script:
570570

571571
```sql
572-
CREATE LOGIN PMLogin WITH PASSWORD ='<password>';
572+
CREATE LOGIN PMLogin
573+
WITH PASSWORD = '<password>';
573574
GO
574575

575576
GRANT VIEW SERVER STATE TO PMLogin;
@@ -610,20 +611,48 @@ A Pacemaker high availability cluster that uses [!INCLUDE [ssnoversion-md](../in
610611

611612
## Create the availability group resources in the Pacemaker cluster (External only)
612613

613-
After you create an availability group in [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], you must create the corresponding resources in Pacemaker when you specify a cluster type of External. Two resources are associated with an availability group: the availability group itself, and an IP address. Configuring the IP address resource is optional if you aren't using the listener functionality, but it's recommended.
614+
After you create an AG in [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], you must create the corresponding resources in Pacemaker when you specify a cluster type of External. Two resources are associated with an AG: the availability group resource, and an IP address resource. Configuring the IP address resource is optional if you aren't using a listener. However, it's recommended when listener functionality is required.
614615

615-
The AG resource you create is a type of resource called a *clone*. The AG resource has copies on each node, and one controlling resource called the *master*. The master is associated with the server hosting the primary replica. The other resources host secondary replicas (regular or configuration-only) and can be promoted to master in a failover.
616+
The AG resource you create is a type of resource called a *clone*. The AG resource has copies on each node, and one controlling resource called the *master*. The *master* is associated with the server hosting the primary replica. The other resources host secondary replicas (regular or configuration-only) and can be promoted to *master* in a failover.
617+
618+
### Pacemaker HA agent v2 (preview)
619+
620+
In [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] with Cumulative Update (CU) 3 and later versions, a new Pacemaker HA agent v2 (`mssql-server-ha`) is available for Red Hat Enterprise Linux (RHEL) and Ubuntu.
621+
622+
Pacemaker HA agent v2 introduces reliability and performance improvements over the previous agent, including:
623+
624+
- Significantly improved failover performance to reduce both planned and unplanned failover times.
625+
- Support for flexible automatic failover policies, including configuration of health-check timeout and failure-condition level.
626+
- Support for TLS 1.3 for communication between the Pacemaker cluster and SQL Server.
627+
628+
Pacemaker HA agent v2 is currently in preview. The existing Pacemaker HA agent (v1) remains fully supported for production deployments.
616629

617630
### [Red Hat Enterprise Linux (RHEL) and Ubuntu](#tab/ru)
618631

619-
1. Create the AG resource with the following syntax:
632+
1. Create the AG resource in Pacemaker using the existing Pacemaker HA agent (v1):
620633

621634
```bash
622635
sudo pcs resource create <NameForAGResource> ocf:mssql:ag ag_name=<AGName> meta failure-timeout=30s promotable notify=true
623636
```
624637

625638
In this example, `NameForAGResource` is the unique name you give to this cluster resource for the AG, and `AGName` is the name of the AG that you created.
626639

640+
To use Pacemaker HA agent v2, create the AG resource using the `agv2` resource agent:
641+
642+
```bash
643+
sudo pcs resource create <NameForAGResource> ocf:mssql:agv2 ag_name=<AGName> meta failure-timeout=30s promotable notify=true
644+
```
645+
646+
New deployments on [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] can evaluate Pacemaker HA agent v2. Existing production deployments should upgrade when appropriate.
647+
648+
When upgrading to or deploying pacemaker HA agent v2, create the new AG resource using the `agv2` agent instead of the previous ag agent. If an existing AG resource is already configured, remove it and create a new resource using `agv2`:
649+
650+
```bash
651+
sudo pcs resource delete <NameForAGResource>
652+
```
653+
654+
This operation temporarily stops AG synchronization while the resource is being recreated. Deleting and recreating the Pacemaker AG resource doesn't delete the AG. After the resource is recreated, Pacemaker resumes management and AG synchronization automatically.
655+
627656
1. Create the IP address resource for the AG that you associate with the listener functionality.
628657

629658
```bash
@@ -709,18 +738,6 @@ The AG resource you create is a type of resource called a *clone*. The AG resour
709738

710739
---
711740

712-
## Next step
713-
714-
In this tutorial, you learned how to create and configure an availability group for [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux. You learned how to:
715-
716-
> [!div class="checklist"]
717-
> - Enable availability groups.
718-
> - Create AG endpoints and certificates.
719-
> - Use [!INCLUDE [ssmanstudiofull-md](../includes/ssmanstudiofull-md.md)] (SSMS) or Transact-SQL to create an AG.
720-
> - Create the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] login and permissions for Pacemaker.
721-
> - Create AG resources in a Pacemaker cluster.
722-
723-
For most AG administration tasks, including upgrades and failing over, see:
741+
## Related content
724742

725-
> [!div class="nextstepaction"]
726-
> [Always On availability group failover on Linux](sql-server-linux-availability-group-failover-ha.md)
743+
- [Always On availability group failover on Linux](sql-server-linux-availability-group-failover-ha.md)

0 commit comments

Comments
 (0)