On 06/15/16 at 04:33pm, Xunlei Pang wrote:
On 2016/06/15 at 15:16, Dave Young wrote:
On 06/15/16 at 02:46pm, Xunlei Pang wrote:
On 2016/06/15 at 14:15, Dave Young wrote:
From "man nfs" : The fstype field contains "nfs". Use of the "nfs4" fstype in /etc/fstab is deprecated. So I guess we can add all related ko modules for "nfs" fstype here, like the patch below?
for i in $(host_fs_all); do
if [[ $i = nfs ]]; then
# From "man nfs": The fstype field contains "nfs". Use of the "nfs4" fstype in /etc/fstab is deprecated.
# For "nfs" fstype, we better install all the possible ko modules(from 95nfs/module-setup.sh installkernel).
i="nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files"
elif [[ $i = nfs[3-4] ]]; then
# For example, map nfs4 to use nfsv4.ko
i=${i/nfs/nfsv}
fi
It sounds good, just wonder if it can be improved by something like instmods =fs/nfs for all the nfs modules in the if section. Not tested, just a guess..
This is cool, it works. I'll try to make a dracut patch.
Glad to see it work :)
Thinking more, it adds more nfs-related ko modules when using "=fs/nfs": -rw-r--r-- 1 root root 49513 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/blocklayout/blocklayoutdriver.ko -rw-r--r-- 1 root root 9249 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs_common/grace.ko -rw-r--r-- 1 root root 9929 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs_common/nfs_acl.ko -rw-r--r-- 1 root root 40705 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/filelayout/nfs_layout_nfsv41_files.ko -rw-r--r-- 1 root root 67393 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko -rw-r--r-- 1 root root 456449 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/nfs.ko -rw-r--r-- 1 root root 69913 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/nfsv3.ko -rw-r--r-- 1 root root 856633 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/nfsv4.ko -rw-r--r-- 1 root root 42849 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/objlayout/objlayoutdriver.ko
Using "nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files", have three less kernel modules installed: -rw-r--r-- 1 root root 9249 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs_common/grace.ko -rw-r--r-- 1 root root 9929 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs_common/nfs_acl.ko -rw-r--r-- 1 root root 40705 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/filelayout/nfs_layout_nfsv41_files.ko -rw-r--r-- 1 root root 456449 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/nfs.ko -rw-r--r-- 1 root root 69913 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/nfsv3.ko -rw-r--r-- 1 root root 856633 Jun 15 02:22 usr/lib/modules/3.10.0-431.el7.test.x86_64/kernel/fs/nfs/nfsv4.ko
Because "nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files" is directly from 95nfs/module_setup.sh installkernel(), it should be safe enough to work.
I think throw out the question and patch to dracut list is better than we discuss it here. Just cc 95nfs authors.
Not sure about the layout drivers, it may be useful for some variant of nfs. But we do not need nfs server side drivers.
Thanks Dave