On some CentOS 7 systems I'm working with, I have Mellanox ConnectX-4 NICs. We want to use the latest Mellanox drivers rather than what's in the system sources. In order for easier deployment, I've wrapped the tarball that Mellanox distributes into an RPM. I'm flushing out errors in my %post and %preun scriptlets in the RPM.
It seemed good measure to do the following:
- 1 find interfaces using mlx*
2 ifconfig <intf> down (for any found)
3 rmmod all mlx* modules
4 perform install from Mellanox
5 modprobe mlx4_en
6 ifconfig <intf> up
What's the magic command to get the device back? Or, am I being too pedantic? Is it sufficient in doing an install like this to just unload the modules, do the Mellanox install and then systemctl restart network?