Today we continue with network file services, but first consider linux kernel modules.
There are four methods of modifying the configuration of a kernel: modify tunable kernel parameters; provide kernel parameters at boot time; compile the kernel from scratch; and load new drivers and modules on the fly into an existing kernel. The latter is the approach that we explore today.
Loadable kernel modules are stored under /lib/modules/version where version is the version of your Linux kernel. Recall that uname -a will tell you which kernel you are currently running. The kernel on your RHEL/CentOS systems has been upgraded (leaving the old one in place) and so there will likely be multiple kernel versions. Take a look through the various subdirectories to see what modules (.ko files) are there.
Find the vfat module, which is the driver for the Windows FAT filesystem with NT long name support. What type of device do you think the cirrusfb module supports? Recall that the find command can help you find the cirrusfb.ko file, with a find . -name "*cirrusfb.ko" -print
The /sbin/lsmod command is used to list the currently loaded modules. Run it to see the modules loaded on your system.
The /sbin/insmod command is used to load a kernel module. Try loading the dummy device. Can you guess what it does? How do you know that it has been loaded? Is it being used?
The /sbin/rmmod command is used to unload a kernel module. Unload the dummy module. How do you know that it is no longer loaded? Can you unload the raid456 module?
Now load the msdos module. You'll get an error about unresolved symbols. This is because the msdos module has dependencies on another module, and can't be loaded until all dependencies are satisfied. To find out what symbols are a problem, run dmesg piped to tail. Look at the common prefix for each of the unresolved symbols. Go ahead and load the missing module first, and then load the msdos module next. Why does "msdos" appear in two lines of lsmod output?
Now try to unload the two modules you just added, but unload msdos last. Do you understand the error message you got? Now unload them in the correct order.
Many modules are loaded automatically when they are needed, rather than only after being loaded manually as we have been doing so far. However, in order to load certain modules, it is important to know what modules it depends on. That information is stored in a modules dependency file called modules.dep. You can find it in the modules directory for your kernel. If you grep for msdos, you'll see the dependency that you discovered above.
There is another utility that can automatically resolve module dependencies. It is called modprobe. It can be used to load the msdos module (along with any dependencies).
This time use modprobe to load the dos module. Run lsmod to see which modules are listed. Is there a dos module? What was loaded instead? The command modprobe -c | grep dos will help you understand what is going on.
Aliases are defined in files in /etc/modprobe.d/, where you can find the dos alias defined.
AFS is a distributed filesystem, pioneered at Carnegie Mellon University that offers a client-server architecture for federated file sharing and replicated read-only content distribution, providing location independence, scalability, security, and transparent migration capabilities across many platforms. The open source version of AFS is called OpenAFS.
OpenAFS is not in the usual RPM repositories, which means you cannot use default yum for installation. However, OpenAFS does have a yum repository--we just need to add it, much like we did for EPEL above.
Note that we installed the DKMS version of the AFS kernel in case we want to run an unsupported kernel (i.e., not already listed for kmod-openafs), which would mean that we would need to build the kernel module.
>cc.lehigh.edu #lehigh university 128.180.2.13 #fs3.cc.lehigh.edu 128.180.2.10 #fs4.cc.lehigh.edu 128.180.2.11 #fs5.cc.lehigh.edu