Επεξεργασία

Κοινή χρήση μέσω


Operate failover cluster instance - SQL Server on Linux

Applies to: SQL Server - Linux

This article explains how to operate a SQL Server failover cluster instance (FCI) on Linux. If you haven't created a SQL Server FCI on Linux, see Configure failover cluster instance - SQL Server on Linux (RHEL).

Failover

Failover for FCIs is similar to a Windows Server failover cluster (WSFC). If the cluster node hosting the FCI experiences some sort of failure, the FCI should automatically fail over to another node. Unlike a WSFC, there's no way to set preferred owners, so Pacemaker picks the node that will be the new host for the FCI.

There are times you might want to manually fail the FCI to another node. The process isn't the same as with FCIs on a WSFC. On a WSFC, you fail over resources at the role level. In Pacemaker, you choose a resource to move, and assuming all the constraints are correct, everything else will move as well.

The way to failover depends on the Linux distribution. Follow the instructions for your linux distribution.

Manual Failover (RHEL or Ubuntu)

To perform a manual failover on Red Hat Enterprise Linux (RHEL) or Ubuntu servers, execute the following steps.

  1. Issue the following command:

    sudo pcs resource move <FCIResourceName> <NewHostNode>
    

    <FCIResourceName> is the Pacemaker resource name for the SQL Server FCI.

    <NewHostNode> is the name of the cluster node that you want to host the FCI.

    You'll not get any acknowledgment.

  2. During a manual failover, Pacemaker creates a location constraint on the resource that was chosen to move manually. To see this constraint, run sudo pcs constraint.

  3. After the failover is complete, remove the constraint by issuing sudo pcs resource clear <FCIResourceName>.

<FCIResourceName> is the Pacemaker resource name for the FCI.

Manual Failover (SLES)

In SUSE Linux Enterprise Server (SLES), use the migrate command to manually fail over a SQL Server FCI. For example:

crm resource migrate <FCIResourceName> <NewHostNode>

<FCIResourceName> is the resource name for the failover cluster instance.

<NewHostNode> is the name of the new destination host.