On 2016/06/06 at 11:12, Dave Young wrote:
Hi Xunlei,
On 06/06/16 at 10:43am, Xunlei Pang wrote:
On 2016/06/06 at 09:55, Dave Young wrote:
On 06/06/16 at 09:01am, Xunlei Pang wrote:
On 2016/06/02 at 16:48, Dave Young wrote:
On 06/02/16 at 04:21pm, Xunlei Pang wrote:
On 2016/06/02 at 15:46, Dave Young wrote: > Hi, Xunlei > > Seems I sent wrong draft, here is the right one: > > Add a question about below > --add-driver "nfs nfsv4" > > Why should we add them? if we addes dracut 95nfs module then it will install > all the nfs kernel modules and network module. Yeah, dracut 95nfs module has installkernel() { instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files }
But actually during my test, I found that if nfs was not mounted, some of the modules (for example nfsv4)will fail to be installed by instmods.
Hmm, it may related to we use hostonly, could you check the instmods function to see if we can handle it without adding drivers in dracut args?
You're right, it's due to the hostonly dracut option, and it's not nfs-only, it's a common issue due to the target not mounted beforehand.
Currently, I can't think of a nice way to handle it without adding drivers explicitly.
Does --force-add works?
I doesn't work, the "nfs" dracut module is ok, it's the "instmods" in dracut's "nfs" that doesn't work. But with the other reply to specify the right "nfsv4" filesytem type, it should work for us.
If --force-add is meant to bypass hostonly then it should be extended to also work in instmods then we can use force-add for these --mount so that one do not need add extra kernel modules.
"--force_add" affects check() in module_setup.sh.
For nfs, it is: # called by dracut check() { # If our prerequisites are not met, fail anyways. require_any_binary rpcbind portmap || return 1 require_binaries rpc.statd mount.nfs mount.nfs4 umount || return 1
[[ $hostonly ]] || [[ $mount_needs ]] && { for fs in "${host_fs_types[@]}"; do [[ "$fs" == "nfs" ]] && return 0 [[ "$fs" == "nfs3" ]] && return 0 [[ "$fs" == "nfs4" ]] && return 0 done return 255 } return 0 }
so only affects the dracut modules to be added.
For nfs instmods, dracut handles it in installkernel(), it is: # called by dracut installkernel() { instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files }
"The --force-add extension to instmods" will involve many dracut's fundamental changes.
Regards, Xunlei
Thanks Dave