Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] NFSv4 Module Loading Issues
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jon Wilder
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 98
Location: Fresno CA

PostPosted: Sat Sep 26, 2015 3:28 pm    Post subject: [SOLVED] NFSv4 Module Loading Issues Reply with quote

Hi. I had NFS working on my systems under NFSv3. I decided to change over to NFSv4. I recompiled the server and client kernels with the appropriate settings.

As far as I can tell, everything on the server side is working fine. However, I cannot get the NFS module to load on the client side.

Upon executing modprobe nfs, I get the following -

Code:

jon@Jon-PC ~ $ sudo modprobe nfs
modprobe: ERROR: could not insert 'nfs': Exec format error


Here are my client side kernel settings -

Code:


--- Network File Systems                                                                               
     <M>   NFS client support                                                                               
     < >    NFS client support for NFS version 2                                                           
     <M>   NFS client support for NFS version 3                                                           
     [ ]    NFS client support for the NFSv3 ACL protocol extension                                     
     <M>   NFS client support for NFS version 4                                                           
     [ ]    Provide swap over NFS support                                                                   
     [*]   NFS client support for NFSv4.1                                                                   
     [*]   NFS client support for NFSv4.2


What could be the issue?


Last edited by Jon Wilder on Sun Sep 27, 2015 3:32 am; edited 1 time in total
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sat Sep 26, 2015 4:46 pm    Post subject: Reply with quote

Your kernel version does not match the module version.
Back to top
View user's profile Send private message
Jon Wilder
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 98
Location: Fresno CA

PostPosted: Sun Sep 27, 2015 12:31 am    Post subject: Reply with quote

According to modinfo, the versions appear to match my kernel version (I'm running kernel 4.2.0-gentoo-r1) -

Code:

jon@Jon-PC /usr/src/linux $ modinfo nfs
filename:       /lib/modules/4.2.0-gentoo-r1/kernel/fs/nfs/nfs.ko
license:        GPL
author:         Olaf Kirch <okir@monad.swb.de>
alias:          nfs4
alias:          fs-nfs4
alias:          fs-nfs
depends:        lockd,sunrpc
intree:         Y
vermagic:       4.2.0-gentoo-r1 SMP mod_unload
parm:           callback_tcpport:portnr
parm:           nfs_idmap_cache_timeout:int
parm:           nfs4_disable_idmapping:Turn off NFSv4 idmapping when using 'sec=sys' (bool)
parm:           max_session_slots:Maximum number of outstanding NFSv4.1 requests the client will negotiate (ushort)
parm:           send_implementation_id:Send implementation ID with NFSv4.1 exchange_id (ushort)
parm:           nfs4_unique_id:nfs_client_id4 uniquifier string (string)
parm:           recover_lost_locks:If the server reports that a lock might be lost, try to recover it risking data corruption. (bool)
parm:           enable_ino64:bool
parm:           nfs_access_max_cachesize:NFS access maximum total cache length (ulong)
jon@Jon-PC /usr/src/linux $ modinfo nfsv4
filename:       /lib/modules/4.2.0-gentoo-r1/kernel/fs/nfs/nfsv4.ko
license:        GPL
depends:        nfs,sunrpc
intree:         Y
vermagic:       4.2.0-gentoo-r1 SMP mod_unload
jon@Jon-PC /usr/src/linux $ modinfo nfsv3
filename:       /lib/modules/4.2.0-gentoo-r1/kernel/fs/nfs/nfsv3.ko
license:        GPL
depends:        nfs,sunrpc,lockd
intree:         Y
vermagic:       4.2.0-gentoo-r1 SMP mod_unload
jon@Jon-PC /usr/src/linux $
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Sep 27, 2015 12:43 am    Post subject: Reply with quote

uname -a will tell you the kernel version. Although I think modinfo probably runs it, too.
I've never seen exec format error for any other reason than version mismatch.
Back to top
View user's profile Send private message
Jon Wilder
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 98
Location: Fresno CA

PostPosted: Sun Sep 27, 2015 1:10 am    Post subject: Reply with quote

Instead I did uname -r -s -v to shorten it up a bit. But it also returns 4.2.0-gentoo-r1 -

Code:

jon@Jon-PC /usr/src/linux $ uname -s -r -v
Linux 4.2.0-gentoo-r1 #1 SMP Sat Sep 19 22:21:10 PDT 2015
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sun Sep 27, 2015 1:34 am    Post subject: Reply with quote

I'm out of ideas, the last thing I'd try is to mount the boot partition and copy over the kernel image again to be 100% sure the kernel and modules are from same build.
Back to top
View user's profile Send private message
Jon Wilder
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 98
Location: Fresno CA

PostPosted: Sun Sep 27, 2015 2:17 am    Post subject: Reply with quote

OK...your last post got me thinking. I recompiled the kernel + modules_install, mounted /boot, then make install.

Then I realized...

I just recently rebuilt my entire Gentoo installation onto a new drive. However, I still had my old drive hooked up. Both drives are formatted GPT with the boot partitions named as "boot".

In /etc/fstab, instead of the /dev/sdx convention, I used the partition names instead.

So when I executed sudo mount /boot, it was mounting the boot partition on my old Gentoo drive instead of on the new one. Hence the new kernel was being copied to the old Gentoo's boot partition and not the new Gentoo boot partition.

So I executed sudo mount /dev/sda2 /boot, then ran make install and rebooted the system. The NFS modules are now autoloading and the NFS mount points are also mounting on boot as well.

Thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum