Skip to content

Commit 6df494b

Browse files
committed
docs: add bond naming fix guide for HA migration
Add a new migration guide section explaining how to rename bonded network devices from the long format (bond-bond0) to the shorter format (b0) that is compatible with High Availability. The section includes backup instructions, the sed command to fix naming, and a link from the HA limitations page. This addresses the issue where long device names from NethServer 7 migrations block HA setup and create UI inconsistencies. Closes #1479
1 parent 684b320 commit 6df494b

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

ha_overview_features_limitations.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Interfaces Limitations
102102
- The HA interface must be a physical interface
103103
- Bonds and bridges are supported only for additional LAN interfaces and WANs, not for the HA interface
104104
- The Hotspot is supported only on physical interfaces
105+
- If you migrated from NethServer 7, bond devices with long names (like ``bond-bond0``) are not compatible with HA. See the :ref:`bond naming fix section <bond_vlan_naming-section>` for instructions on how to rename them.
105106

106107

107108
General limitations

migration.rst

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,52 @@ The migration process is logged inside a special log file located at ``/root/mig
153153
This file contains all the actions performed during the migration process.
154154
Please note that the log file is deleted after an image upgrade.
155155

156+
.. _bond_vlan_naming-section:
157+
158+
Fixing bond and VLAN naming for High Availability
159+
-------------------------------------------------
160+
161+
If you migrated from NethServer 7, you might notice that your bonded network devices have long names like ``bond-bond0`` instead of
162+
the shorter ``bond0`` format used in fresh NethSecurity 8 installations.
163+
While this doesn't affect basic functionality, these longer names can prevent you from setting up :ref:`High Availability (HA) <ha_overview_features_limitations-section>`
164+
and may look inconsistent in the user interface.
165+
166+
If you plan to use High Availability or simply prefer cleaner device names, you can rename them using a simple script.
167+
168+
Before you start, make a backup copy of your network configuration:
169+
170+
.. code-block:: bash
171+
172+
cp /etc/config/network /root/network.ori
173+
174+
Then, run this command to rename the devices:
175+
176+
.. code-block:: bash
177+
178+
sed -i \
179+
-e "/option[[:space:]]\+ifname/s/'bond-bond\([0-9]\+\)'/'bond-b\1'/" \
180+
-e "/option[[:space:]]\+device/s/'bond-bond\([0-9]\+\)'/'bond-b\1'/" \
181+
-e "/option[[:space:]]\+name/s/'bond-bond\([0-9]\+\)\(\.[0-9]\+\)'/'b\1\2'/" \
182+
-e "/option[[:space:]]\+name/s/'bond-bond\([0-9]\+\)'/'bond-b\1'/" \
183+
-e "s/^\([[:space:]]*option[[:space:]]\+name[[:space:]]\+\)'b\([0-9]\+\)'\([[:space:]]*\)$/\1'bond-b\2'\3/" \
184+
/etc/config/network
185+
186+
After running the script, restart the network to apply the changes:
187+
188+
.. code-block:: bash
189+
190+
/etc/init.d/network restart
191+
192+
Alternatively, you can reboot the entire system to ensure all changes take effect properly.
193+
194+
Once you verify that everything is working correctly, you can safely delete the backup:
195+
196+
.. code-block:: bash
197+
198+
rm -f /root/network.ori
199+
200+
After the changes, your devices will use the shorter naming convention (e.g., ``b0``, ``b0.20``), which is compatible with High Availability and matches fresh installations.
201+
156202
Migration coverage matrix
157203
=========================
158204

@@ -170,7 +216,7 @@ The following table shows what is migrated from NethServer 7 and what still need
170216
- The same password can be used for SSH and the web interface.
171217
* - Network interfaces and VLANs
172218
- Migrated with limits
173-
- Network configuration is migrated. Bridges over bonds are not supported. On new hardware, VLANs are recreated automatically on the physical interface chosen during remapping.
219+
- Network configuration is migrated. Bridges over bonds are not supported. On new hardware, VLANs are recreated automatically on the physical interface chosen during remapping. If you migrated from NethServer 7 and need to normalize bond and VLAN names for HA, see :ref:`bond_vlan_naming-section`.
174220
* - Network interface labels
175221
- Migrated
176222
- Source labels are kept as interface names, except on WAN interfaces which keep their original names.

0 commit comments

Comments
 (0)