I need to load the
drbd module on my CentOS server at boot time. I know a module can be loaded without the need of a restart using
modprobe drbd but of course after a system reboot I would have to load it again manually. I came across Persistent Module Loading and it says
Kernel modules are usually loaded directly by the facility that requires them, which is given correct settings in the /etc/modprobe.conf file.
I don't have the conf file, just the
Next it says:
Red Hat Enterprise Linux checks for the existence of the /etc/rc.modules file at boot time, which contains various commands to load modules.
So not sure whether this applies only to RHEL or CentOS as well (it's CentOS documentation) but
/etc/rc.moduleswas missing as well.
# echo modprobe foo >> /etc/rc.modules # chmod +x /etc/rc.modules
I can see the drbd module being loaded even after a reboot:
Is it ok how I did it ? Second question - the CentOS 7 OS I'm using is for testing purposes - the production system will run on RHEL 7. Would I still apply the same steps to load the module at boot?
Thank you in advance!