Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit f6b126d

Browse files
authored
Merge pull request #16293 from MikeRayMSFT/20200728-sql-server-linux-configure-multiple-subnet
sql server linux configure multiple subnet
2 parents 734f100 + a26630d commit f6b126d

1 file changed

Lines changed: 35 additions & 15 deletions

File tree

docs/linux/sql-server-linux-configure-multiple-subnet.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Configure multiple-subnet availability group & FCI (Linux)
33
description: Learn to configure multiple-subnet Always On availability groups and failover cluster instances (FCI) for SQL Server on Linux.
44
ms.custom: seo-lt-2019
5-
author: MikeRayMSFT
6-
ms.author: mikeray
7-
ms.reviewer: vanto
8-
ms.date: 12/01/2017
5+
author: liweiSecurity
6+
ms.author: liweiyin
7+
ms.reviewer: VanMSFT
8+
ms.date: 07/28/2020
99
ms.topic: conceptual
1010
ms.prod: sql
1111
ms.technology: linux
@@ -52,28 +52,42 @@ In the Windows world, a Windows Server Failover Cluster (WSFC) natively supports
5252
2. Edit the file that was generated. Look for the `<resources>` section. You will see the various resources that were created for the AG or FCI. Find the one associated with the IP address. Add a `<instance attributes>` section with the information for the second IP address either above or below the existing one, but before `<operations>`. It is similar to the following syntax:
5353

5454
```xml
55-
<instance attributes id="<NameForAttribute>" score="<Score>">
56-
<rule id="<RuleName>" score="INFINITY">
57-
<expression id="<ExpressionName>" attribute="\#uname" operation="eq" value="<NodeNameInSubnet2>" />
58-
</rule>
59-
<nvpair id="<NameForSecondIP>" name="ip" value="<IPAddress>"/>
60-
<nvpair id="<NameForSecondIPNetmask>" name="cidr\_netmask" value="<Netmask>"/>
55+
<instance attributes id="<NameForAttribute>">
56+
<nvpair id="<NameForIP>" name="ip" value="<IPAddress>"/>
6157
</instance attributes>
6258
```
6359

64-
where *NameForAttribute* is the unique name for this attribute, *Score* is the number assigned to the attribute, which must be higher than the primary subnet's, *RuleName* is the name of the rule, *ExpressionName* is the name of the expression, *NodeNameInSubnet2* is the name of the node in the other subnet, *NameForSecondIP* is the name associated with the second IP address, *IPAddress* is the IP address for the second subnet, *NameForSecondIPNetmask* is the name associated with the netmask, and *Netmask* is the netmask for the second subnet.
60+
where *NameForAttribute* is the unique name for this attribute, *NameForIP* is the name associated with the IP address, *IPAddress* is the IP address for the second subnet.
6561

6662
The following shows an example.
6763

6864
```xml
69-
<instance attributes id="Node3-2nd-IP" score="2">
65+
<instance attributes id="virtualip-instance_attributes">
66+
<nvpair id="virtualip-instance_attributes-ip" name="ip" value="192.168.1.102"/>
67+
</instance attributes>
68+
```
69+
70+
By default, there is only one <instance/> in the CIB XML file exported. Let's say there are two subnets, you need to have two <instance/> entries.
71+
Here is an example of entries for two subnets
72+
73+
```xml
74+
<instance attributes id="virtualip-instance_attributes1">
75+
<rule id="Subnet1-IP" score="INFINITY" boolean-op="or">
76+
<expression id="Subnet1-Node1" attribute="#uname" operation="eq" value="Node1" />
77+
<expression id="Subnet1-Node2" attribute="#uname" operation="eq" value="Node2" />
78+
</rule>
79+
<nvpair id="IP-In-Subnet1" name="ip" value="192.168.1.102"/>
80+
</instance attributes>
81+
<instance attributes id="virtualip-instance_attributes2">
7082
<rule id="Subnet2-IP" score="INFINITY">
71-
<expression id="Subnet2-Node" attribute="\#uname" operation="eq" value="Node3" />
83+
<expression id="Subnet2-Node1" attribute="#uname" operation="eq" value="Node3" />
7284
</rule>
73-
<nvpair id="IP-In-Subnet-2" name="ip" value="192.168.2.102"/>
74-
<nvpair id="Netmask-For-IP2" name="cidr\_netmask" value="24" />
85+
<nvpair id="IP-In-Subnet2" name="ip" value="192.168.2.102"/>
7586
</instance attributes>
7687
```
88+
89+
The 'boolean-op="or"' is used when the subnet has more than one server.
90+
7791
7892
3. Import the modified CIB and reconfigure Pacemaker.
7993
@@ -94,6 +108,12 @@ In the Windows world, a Windows Server Failover Cluster (WSFC) natively supports
94108
### Check and verify failover
95109
96110
1. After the CIB is successfully applied with the updated configuration, ping the DNS name associated with the IP address resource in Pacemaker. It should reflect the IP address associated with the subnet currently hosting the AG or FCI.
111+
97112
2. Fail the AG or FCI to the other subnet.
113+
98114
3. After the AG or FCI is fully online, ping the DNS name associated with the IP address. It should reflect the IP address in the second subnet.
115+
99116
4. If desired, fail the AG or FCI back to the original subnet.
117+
118+
Here is a CSS post showing how to configure the CIB for three subnets, please review for detail:
119+
[Configure multiple-subnet AlwaysOn Availability Group by modifying CIB](https://techcommunity.microsoft.com/t5/sql-server-support/configure-multiple-subnet-alwayson-availability-groups-by/ba-p/1544838).

0 commit comments

Comments
 (0)