Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9bd5f55

Browse files
committedSep 10, 2024·
Document how to change the MTU
Signed-off-by: Jian Wang <[email protected]>
1 parent 1bf0dce commit 9bd5f55

File tree

2 files changed

+106
-3
lines changed

2 files changed

+106
-3
lines changed
 

‎docs/advanced/storagenetwork.md

+4
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ Because of the design, Harvester will treat extra and insignificant characters i
140140
141141
:::
142142
143+
#### Change the MTU of the Storage Network
144+
145+
Follow the guide [Change the MTU of Network Config which has Storage Network Attached](../networking/clusternetwork.md#change-the-mut--of-network-config-which-has-storage-network-attached) to change the MTU of the Storage Network.
146+
143147
### After Applying Harvester Storage Network Setting
144148
145149
After applying Harvester's Storage Network setting, Harvester will stop all pods that are related to Longhorn volumes. Currently, Harvester has some pods listed below that will be stopped during setting.

‎docs/networking/clusternetwork.md

+102-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ The [witness node](../advanced/witness.md) is generally not involved in the cust
9393

9494
:::
9595

96-
#### How to create a new cluster network
96+
## Configurations
9797

98-
1. To create a cluster network, go to the **Networks > ClusterNetworks/Configs** page and click the **Create** button. You only need to specify the name.
98+
### Create a new Cluster Network
99+
100+
1. To create a new cluster network, go to the **Networks > ClusterNetworks/Configs** page and click the **Create** button. You only need to specify the name.
99101

100102
![](/img/v1.2/networking/create-clusternetwork.png)
101103

@@ -114,7 +116,7 @@ The method **Select all nodes** works only when all nodes use the exact same ded
114116
:::
115117

116118
4. Click the **Uplink** tab to add the NICs, and configure the bond options and link attributes. The bond mode defaults to `active-backup`.
117-
119+
118120
![](/img/v1.2/networking/config-uplink.png)
119121

120122
:::note
@@ -131,3 +133,100 @@ Starting with Harvester v1.1.2, Harvester supports updating network configs. Mak
131133
To simplify cluster maintenance, create one network configuration for each node or group of nodes. Without dedicated network configurations, certain maintenance tasks (for example, replacing old NICs with NICs in different slots) will require you to stop and/or migrate the affected VMs before updating the network configuration.
132134

133135
:::
136+
137+
### Edit the Network Config
138+
139+
#### Change the MTU of Network Config which has no Storage Network attached
140+
141+
You may plan to change the `MTU` of an existing `Cluster Network`. And the [Storage Network](../advanced/storagenetwork.md#harvester-storage-network-setting) is not enabled or not attached to this `Cluster Network`.
142+
143+
The `MTU` on each `Network Config` of an existing custom `Cluster Network` is strictly to be identical. There are many restrictions to change the `MTU`, the following steps should be followed:
144+
145+
1. Stop all the VMs which are attached to the target `Cluster Network`, this can be checked via the [VM Network](./harvester-network.md#create-a-vm-network) and [VM attached Secondary Network](../vm/create-vm.md#secondary-network). When any of the VMs is still running, Harvester will refuse the change.
146+
147+
2. Check the number of `Network Config` of the target `Cluster Network`, if the number is greater than one, then repeat the operations below until there is only one `Network Config` left:
148+
149+
1. Record the `Node Selector` of a `Network Config`;
150+
151+
1. Remove this `Network Config`;
152+
153+
3. Change the `MTU` of the last `Network Config`.
154+
155+
4. Check the `MTU` on the selected Harvester nodes via the Linux `ip link` command, the related `*-br` device should be `UP` and with the new `MTU`.
156+
157+
```
158+
Harvester node $ ip link
159+
160+
|new MTU| |state UP|
161+
3: cn-data-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
162+
link/ether 52:54:00:6e:5c:2a brd ff:ff:ff:ff:ff:ff
163+
```
164+
165+
5. Test the new MTU on Harvester nodes via command like `ping` to another Harvester node (with the new MTU) or an external device.
166+
167+
```
168+
Harvester node $ ping 8.8.8.8 -s 8800
169+
170+
PING 8.8.8.8 (8.8.8.8) 8800(8828) bytes of data
171+
172+
# the `-s` specify the ping packet size, which can test if the new MTU really works
173+
174+
```
175+
176+
6. Add those `Network Config` which were removed on Step 2, each should set the `MTU` to the new value. And run step 4, 5 to test.
177+
178+
7. Start the VMs mentioned in step 1.
179+
180+
:::note
181+
182+
- The `MTU` affects both of the Harvester nodes and the infrastructure layer networking devices like Switches and Routers, the careful planning and testing are required to sure the new MTU.
183+
184+
- This method does not work on the built-in `mgmt Cluster Network`.
185+
186+
:::
187+
188+
#### Change the MTU of Network Config which has Storage Network Attached
189+
190+
You may plan to change the `MTU` of an existing `Cluster Network`. And the [Storage Network](../advanced/storagenetwork.md#harvester-storage-network-setting) is enabled or attached to this `Cluster Network`. The `Storage Network` is dedicatedly used by `Longhorn`, the default CSI driver of Harvester cluster. Because the `Longhorn` is responsible for at least the [root disk](../vm/create-vm.md#volumes) of all VMs, this change will affect all the VMs.
191+
192+
The `MTU` on each `Network Config` of an existing custom `Cluster Network` is strictly to be identical. There are many restrictions to change the `MTU`, the following steps should be followed:
193+
194+
1. Stop all the VMs.
195+
196+
2. Disable the Harvester [Storage Network](../advanced/storagenetwork.md#harvester-storage-network-setting). Wait until the [change is applied](../advanced/storagenetwork.md#harvester-storage-network-setting#step-1).
197+
198+
3. Check the number of `Network Config` of the target `Cluster Network`, if the number is greater than one, then repeat the operations below until there is only one `Network Config` left:
199+
200+
1. Record the `Node Selector` of a `Network Config`;
201+
202+
1. Remove this `Network Config`;
203+
204+
4. Change the `MTU` of the last `Network Config`.
205+
206+
5. Check the `MTU` on the selected Harvester nodes via the Linux `ip link` command, the related `*-br` device should be `UP` and with the new `MTU`.
207+
208+
```
209+
Harvester node $ ip link
210+
211+
|new MTU| |state UP|
212+
213+
3: cn-data-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
214+
link/ether 52:54:00:6e:5c:2a brd ff:ff:ff:ff:ff:ff
215+
```
216+
217+
6. Test the new MTU on Harvester nodes via command like `ping` to another Harvester node (with the new MTU) or an external device.
218+
219+
```
220+
Harvester node $ ping 8.8.8.8 -s 8800
221+
222+
PING 8.8.8.8 (8.8.8.8) 8800(8828) bytes of data
223+
224+
# the `-s` specify the ping packet size, which can test if the new MTU really works
225+
226+
```
227+
228+
7. Add those `Network Config` which were removed on Step 2, each should set the `MTU` to the new value. And run step 4, 5 to test.
229+
230+
8. Enable and set the Harvester [Storage Network](../advanced/storagenetwork.md#harvester-storage-network-setting), note the [Prerequisites](../advanced/storagenetwork.md#prerequisites) are met in the above steps. Wait until the [change is applied](../advanced/storagenetwork.md#harvester-storage-network-setting#step-1).
231+
232+
9. Start the VMs mentioned in step 1.

0 commit comments

Comments
 (0)
Please sign in to comment.