Linux interface card can get lost after a restore operation using netbackup. If you can’t restore your interfaces, and you end up adding new ones, their MAC address will be different from the old interfaces you had and they will get a different name.
I was in a situation where I have to restore a VMware virtual machine using netbackup 7.5, the restore operation has completed successfully, but I found myself with many missing network interfaces card , I thought this wasn’t a a big problem, just add the required interface, specify the port group and voilà! unfortunately, this wasn’t the case.
I have configured the tree required interface but my linux box showed them as follow :
[root@host0256 ~]# ls -l /sys/class/net/ total 0 lrwxrwxrwx. 1 root root 0 Jan 29 15:53 eth3 -> ../../devices/pci0000:00/0000:00:16.0/0000:0b:00.0/net/eth3 lrwxrwxrwx. 1 root root 0 Jan 29 15:53 eth4 -> ../../devices/pci0000:00/0000:00:17.0/0000:13:00.0/net/eth4 lrwxrwxrwx. 1 root root 0 Jan 29 15:53 eth5 -> ../../devices/pci0000:00/0000:00:18.0/0000:1b:00.0/net/eth5 lrwxrwxrwx. 1 root root 0 Jan 29 15:53 lo -> ../../devices/virtual/net/lo
If you examine the network card configuration file in /etc/sysconfig/network-scripts/, you will see that there is no configuration for the new network interface card, and if you try to bring the old interface up with ifup eth0 for example, you’ll get this error:
In Linux, in this case Redhat, the udev utility use the configuration file on /usr/lib/udev/rules.d/ to rename new interfaces based on their properties, in our case it was the configuration file /usr/lib/udev/rules.d/60-net.rules that was responsible for renaming our new network interface card using the HWADDR (mac address) property.
We have two choice here:
1- Keep the new one and create new configuration file for them.
2- Keep the old name. <= my choice
There many way to do this, but let’s do it using the KISS principle.
1- Using a text editor like vi, remove any reference to the HWADDR on the old network interface card in /etc/sysconfig/network-scripts/ifcfg-eth*
2- Remove this file
3- Reboot the virtual machine
After that, we get our old network card name and all interfaces are up & running.