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

Commit 316eee1

Browse files
authored
Update sql-server-linux-configure-multiple-subnet.md
This document is stalled, customer can't configure SQL Server AG in multiple-subnet scenario. I had meeting session with RHEL team and figured the right now to configure the CIB file. Please see the RFC https://sqlbuvsts01:8443/Main/SQL%20Server/_workitems#_a=edit&id=13614974 for detail
1 parent 85f44ee commit 316eee1

1 file changed

Lines changed: 28 additions & 11 deletions

File tree

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

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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 servers.
90+
7791
7892
3. Import the modified CIB and reconfigure Pacemaker.
7993
@@ -97,3 +111,6 @@ In the Windows world, a Windows Server Failover Cluster (WSFC) natively supports
97111
2. Fail the AG or FCI to the other subnet.
98112
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.
99113
4. If desired, fail the AG or FCI back to the original subnet.
114+
115+
Here is a CSS post showing how to configure the CIB for three subnets, please reveiw for detail.
116+
https://techcommunity.microsoft.com/t5/sql-server-support/configure-multiple-subnet-alwayson-availability-groups-by/ba-p/1544838

0 commit comments

Comments
 (0)