Skip to content

Commit 789d17b

Browse files
committed
Document how to change the MTU
Signed-off-by: Jian Wang <[email protected]>
1 parent 1bf0dce commit 789d17b

File tree

5 files changed

+129
-6
lines changed

5 files changed

+129
-6
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+
When you plan to change the MTU of the Storage Network, please follow the guide [Change the MTU of Network Config which has Storage Network Attached](../networking/clusternetwork.md#change-the-mtu-of-network-config-which-has-storage-network-attached).
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

+112-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+
### How to 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,110 @@ 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+
### How to Change the Network Config
138+
139+
Changes on the existing `Network Config` may affect both the Harvester VMs/workloads and the external devices/systems like Switches/Routers. For more information, please see [Network Topology](./deep-dive.md#network-topology).
140+
141+
#### Change the MTU of Network Config which has no Storage Network attached
142+
143+
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`.
144+
145+
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:
146+
147+
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.
148+
149+
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:
150+
151+
1. Record the `Node Selector` of a `Network Config`;
152+
153+
1. Remove this `Network Config`;
154+
155+
3. Change the `MTU` of the last `Network Config`.
156+
157+
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`.
158+
159+
```
160+
Harvester node $ ip link
161+
162+
|new MTU| |state UP|
163+
3: cn-data-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
164+
link/ether 52:54:00:6e:5c:2a brd ff:ff:ff:ff:ff:ff
165+
```
166+
167+
5. Test the new MTU on Harvester nodes via command like `ping` to another Harvester node (with the new MTU) or an external device.
168+
169+
```
170+
Harvester node $ ping 8.8.8.8 -s 8800
171+
172+
PING 8.8.8.8 (8.8.8.8) 8800(8828) bytes of data
173+
174+
# the `-s` specify the ping packet size, which can test if the new MTU really works
175+
176+
```
177+
178+
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 and verify the new `MTU`.
179+
180+
7. Start the VMs mentioned in step 1.
181+
182+
:::note
183+
184+
- The `MTU` affects both of the Harvester nodes and the infrastructure networking devices like Switches and Routers, the careful planning and testing are required to sure the new `MTU`. For more information, please see [Network Topology](./deep-dive.md#network-topology).
185+
186+
- This method does not work on the built-in `mgmt Cluster Network`.
187+
188+
:::
189+
190+
#### Change the MTU of Network Config which has Storage Network Attached
191+
192+
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.
193+
194+
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:
195+
196+
1. Stop all the VMs.
197+
198+
2. Disable the Harvester [Storage Network](../advanced/storagenetwork.md#harvester-storage-network-setting). Wait and [Verify Configuration is Completed](../advanced/storagenetwork.md#verify-configuration-is-completed).
199+
200+
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:
201+
202+
1. Record the `Node Selector` of a `Network Config`;
203+
204+
1. Remove this `Network Config`;
205+
206+
4. Change the `MTU` of the last `Network Config`.
207+
208+
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`.
209+
210+
```
211+
Harvester node $ ip link
212+
213+
|new MTU| |state UP|
214+
215+
3: cn-data-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
216+
link/ether 52:54:00:6e:5c:2a brd ff:ff:ff:ff:ff:ff
217+
```
218+
219+
6. Test the new MTU on Harvester nodes via command like `ping` to another Harvester node (with the new MTU) or an external device.
220+
221+
```
222+
Harvester node $ ping 8.8.8.8 -s 8800
223+
224+
PING 8.8.8.8 (8.8.8.8) 8800(8828) bytes of data
225+
226+
# the `-s` specify the ping packet size, which can test if the new MTU really works
227+
228+
```
229+
230+
7. Add those `Network Config` which were removed on Step 3, each should set the `MTU` to the new value. And run step 5, 6 to test and verify the new `MTU`.
231+
232+
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 and [Verify Configuration is Completed](../advanced/storagenetwork.md#verify-configuration-is-completed).
233+
234+
9. Start the VMs mentioned in step 1.
235+
236+
:::note
237+
238+
- The `MTU` affects both of the Harvester nodes and the infrastructure networking devices like Switches and Routers, the careful planning and testing are required to sure the new `MTU`. For more information, please see [Network Topology](./deep-dive.md#network-topology).
239+
240+
- This method does not work on the built-in `mgmt Cluster Network`.
241+
242+
:::

docs/networking/deep-dive.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ keywords:
1212
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/networking/deep-dive"/>
1313
</head>
1414

15+
## Network Topology
16+
1517
The network topology below reveals how we implement the Harvester network.
1618

1719
![](/img/v1.2/networking/topology.png)

docs/networking/harvester-network.md

+8
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ The [Harvester network-controller](https://github.com/harvester/harvester-networ
6969

7070
![](/img/v1.2/networking/create-vlan-network.png)
7171

72+
:::note
73+
74+
The `VM Network` inheriates the `MTU` from the `Network Config` of the `Cluster Network`, this makes sure the VMs will get the best match and best performance from the hardware. It is not allowed to set a different `MTU` on the `VM Network`.
75+
76+
Follow the guide [Change the MTU of Network Config which has Storage Network Attached](./clusternetwork.md#change-the-mtu-of-network-config-which-has-storage-network-attached) or [Change the MTU of Network Config which has no Storage Network Attached](./clusternetwork.md#change-the-mtu-of-network-config-which-has-no-storage-network-attached) to set a different `MTU`, then the `VM Network` will have the new `MTU` automatically.
77+
78+
:::
79+
7280
1. On the Route tab, select an option and then specify the related IPv4 addresses.
7381

7482
- Auto(DHCP): The Harvester network controller retrieves the CIDR and gateway addresses from the DHCP server. You can specify the DHCP server address.

docs/vm/create-vm.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Please refer to [this page](./create-windows-vm.md) for creating Windows virtual
3737
1. (Optional) VM template is optional, you can choose `iso-image`, `raw-image` or `windows-iso-image` template to speed up your VM instance creation.
3838
1. Configure the virtual machine's CPU and memory (see [overcommit settings](../advanced/settings.md#overcommit-config) if you want to over-provision).
3939
1. Select SSH keys or upload new keys.
40-
1. Select a custom VM image on the **Volumes** tab. The default disk will be the root disk. You can add more disks to the VM.
40+
1. Select a custom VM image on the **Volumes** tab. The default disk will be the `root disk`. You can add more disks to the VM.
4141
1. To configure networks, go to the **Networks** tab.
4242
1. The **Management Network** is added by default, you can remove it if the VLAN network is configured.
4343
1. You can also add additional networks to the VMs using VLAN networks. You may configure the VLAN networks on **Advanced > Networks** first.
@@ -142,7 +142,7 @@ resource "harvester_virtualmachine" "opensuse154" {
142142

143143
## Volumes
144144

145-
You can add one or more additional volumes via the `Volumes` tab, by default the first disk will be the root disk, you can change the boot order by dragging and dropping volumes, or using the arrow buttons.
145+
You can add one or more additional volumes via the `Volumes` tab, by default the first disk will be the `root disk`, you can change the boot order by dragging and dropping volumes, or using the arrow buttons.
146146

147147
A disk can be made accessible via the following types:
148148

@@ -167,7 +167,7 @@ By default, Harvester sets the volume size to either 10 GiB or the virtual size
167167

168168
A container disk is an ephemeral storage volume that can be assigned to any number of VMs and provides the ability to store and distribute VM disks in the container image registry. A container disk is:
169169
- An ideal tool if you want to replicate a large number of VM workloads or inject machine drivers that do not require persistent data. Ephemeral volumes are designed for VMs that need more storage but don't care whether that data is stored persistently across VM restarts or only expect some read-only input data to be present in files, like configuration data or secret keys.
170-
- Not a good solution for any workload that requires persistent root disks across VM restarts.
170+
- Not a good solution for any workload that requires persistent `root disks` across VM restarts.
171171

172172
A container disk is added when creating a VM by providing a Docker image. When creating a VM, follow these steps:
173173

0 commit comments

Comments
 (0)