You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/linux/sql-server-linux-create-availability-group.md
+78-15Lines changed: 78 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -615,39 +615,101 @@ After you create an AG in [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.
615
615
616
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
617
618
-
### Pacemaker HA agent v2 (preview)
618
+
> [!NOTE]
619
+
> In [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] with Cumulative Update (CU) 3 and later versions, Pacemaker HA agent v2 (Preview) is available for Red Hat Enterprise Linux (RHEL) and Ubuntu through the `mssql-server-ha` package. Non-production deployments can evaluate Pacemaker HA agent v2. The existing Pacemaker HA agent (v1) remains fully supported for production deployments. For more information, see [Pacemaker HA agent v2 (Preview)](#pacemaker-ha-agent-v2-preview).
619
620
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
+
### [Red Hat Enterprise Linux (RHEL) and Ubuntu](#tab/ru)
621
622
622
-
Pacemaker HA agent v2 introduces reliability and performance improvements over the previous agent, including:
623
+
#### Pacemaker HA agent v1
623
624
624
-
- Improved failover performance to reduce both planned and unplanned failover times.
625
+
1. Create the AG resource in Pacemaker by using the Pacemaker HA agent (v1): (`ocf:mssql:ag`)
625
626
626
-
- Support for flexible automatic failover policies, including configuration of [health-check timeout](../database-engine/availability-groups/windows/configure-flexible-automatic-failover-policy.md#HCtimeout) and [failure-condition level](../database-engine/availability-groups/windows/configure-flexible-automatic-failover-policy.md#failure-condition-level).
- Support for TLS 1.3 for communication between the Pacemaker cluster and SQL Server.
631
+
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.
629
632
630
-
Pacemaker HA agent v2 is currently in preview. The existing Pacemaker HA agent (v1) remains fully supported for production deployments.
633
+
1. Create the IP address resource for the AG that you associate with the listener functionality.
631
634
632
-
### [Red Hat Enterprise Linux (RHEL) and Ubuntu](#tab/ru)
sudo pcs constraint colocation add <NameForIPResource> with promoted <NameForAGResource>-clone INFINITY
638
645
```
639
646
640
-
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.
647
+
In this example, `NameForIPResource` is the name for the IP resource, and `NameForAGResource` is the name for the AG resource.
641
648
642
-
To use Pacemaker HA agent v2, create the AG resource using the `agv2` resource agent:
649
+
1. Create an ordering constraint to ensure that the AG resource is up and running before the IP address. While the colocation constraint implies an ordering constraint, this step enforces it.
sudo pcs constraint order promote <NameForAGResource>-clone then start <NameForIPResource>
653
+
```
654
+
655
+
In this example, `NameForIPResource` is the name for the IP resource, and `NameForAGResource` is the name for the AG resource.
656
+
657
+
#### Pacemaker HA agent v2 (Preview)
658
+
659
+
Pacemaker HA agent v2 uses a service‑based architecture. The agent runs as a dedicated system service named `mssql-pcsag`, which is responsible for handling SQL Server–specific high availability operations and communication with Pacemaker.
660
+
661
+
The `mssql-pcsag` service is managed by using standard system service controls. You can start, stop, restart, and check the status of this service as needed by using the following commands:
662
+
663
+
```bash
664
+
sudo systemctl start mssql-pcsag # Start the Pacemaker HA agent v2 (mssql-pcsag) service
665
+
sudo systemctl stop mssql-pcsag # Stop the Pacemaker HA agent v2 (mssql-pcsag) service
666
+
sudo systemctl restart mssql-pcsag # Restart the Pacemaker HA agent v2 (mssql-pcsag) service
667
+
sudo systemctl status mssql-pcsag # Check the status of the Pacemaker HA agent v2 (mssql-pcsag) service
668
+
```
669
+
670
+
671
+
Pacemaker interacts with SQL Server availability groups through the `mssql-pcsag` service. For availability group monitoring and failover to function correctly:
672
+
673
+
- The Pacemaker cluster must be running.
674
+
- The `mssql-pcsag` service must be running.
675
+
676
+
While Pacemaker and `mssql-pcsag` are deployed as separate components, they operate together at runtime. If either Pacemaker or the `mssql-pcsag` service is stopped, availability group failover operations don't function as expected.
677
+
678
+
> [!NOTE]
679
+
> Restarting the `mssql-pcsag` service doesn't restart SQL Server. Similarly, restarting SQL Server doesn't automatically restart the Pacemaker HA agent. Verify that both services are running during troubleshooting.
680
+
681
+
Pacemaker HA agent v2 introduces reliability and performance improvements over the previous agent, including:
682
+
683
+
- Improved failover performance to reduce both planned and unplanned failover times.
684
+
685
+
- Support for flexible automatic failover policies, including configuration of [failure-condition level](../database-engine/availability-groups/windows/configure-flexible-automatic-failover-policy.md#failure-condition-level) and [health-check timeout](../database-engine/availability-groups/windows/configure-flexible-automatic-failover-policy.md#HCtimeout).
686
+
687
+
Example: The following Transact-SQL statement changes the failure-condition level of an existing availability group named AG1 to level 2:
688
+
689
+
```sql
690
+
ALTER AVAILABILITY GROUP AG1 SET (FAILURE_CONDITION_LEVEL =2);
691
+
```
692
+
693
+
Example: The following Transact-SQL statement changes the health-check timeout threshold of an existing availability group named AG1 to 60,000 milliseconds (60 seconds).
694
+
695
+
```sql
696
+
ALTER AVAILABILITY GROUP AG1 SET (HEALTH_CHECK_TIMEOUT =60000);
697
+
```
698
+
Example: After applying the configuration, use the following Transact-SQL statement to verify the configured failure-condition level and health-check timeout for availability groups.
New deployments on [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] can evaluate Pacemaker HA agent v2. Existing production deployments should upgrade when appropriate.
704
+
- Support for TLS 1.3 for communication between the Pacemaker cluster and SQL Server.
649
705
650
-
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 you already configured an existing AG resource, remove it and create a new resource using `agv2`:
706
+
1. Create the AG resource in Pacemaker by using Pacemaker HA agent v2: (`ocf:mssql:agv2`)
0 commit comments