NFS usually does not work, how to troubleshoot?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NFS usually does not work, how to troubleshoot?

7,913 Views
Matt_ng9
Contributor III

Hi,

 

I am having trouble using NFS on my i.MX28 board.  I am using custom hardware, so I do not know if the issue is with my board or with software.

 

My setup: I have static IP addresses assigned to the host and target so that I don't have to mess with DHCP.  I plug the host and device directly into eachother, no hub/switch/router.  I am running Ubuntu 10.10 on the host, and the ethernet port on the host is set to auto-detect settings.

 

First I set up u-boot to do a network boot.  The FTP always works great, but usually the NFS fails.  I have a pretty poor success rate.  But I do notice, if I cycle the power to the board quickly, I am more likely to fail then if I wait a minute before turning power back on.

 

Another interesting thing, when I was trying to use the u-boot NFS feature, the target would broadcast a "whois" to see where the host was, and the host would reply right away with its MAC address, and then the whole process repeated for a total of 6 times before giving up.  It didn't even start the NFS stuff.  So it seems like the Rx on the target was not working for some reason, or else why would it ask 6 times where the host was? (I think it was 6, but don't quote me on that).

 

I next did a SD card boot, and once everything loaded, I logged in and tried

mount -t nfs 192.168.0.10:/tftpboot/rootfs /mnt/nfs"

...but I get this...

svc: failed to register lockdv1 RPC service (errno 111).

mount: mounting 192.168.0.10:/tftpboot/rootfs on /mnt/nfs failed: Connection refused

 

This is really all the diagnostics I have done so far...

  1. After successfully booting the target using the SD card boot method, I used Wireshark and saw that it seemingly should have worked (at least my host and board talk to each other)
    • My host responded to MNT with a status of "OK"
    • My host  responded to GETPORT with a good port (2049 in this case)
    • Next one I am not sure of... the protocol was NFS, the message to my host was "V3 NULL Call" and the response from the host was "V3 NULL Reply".. not sure what that means but being it was a reply, and no further attepmts were made, it seems like it should have worked.
  2. I did a ping test overnight, and only maybe 40 were lost out of thousands of pings (so the ping utility said 0% loss).  So it seems like the HW is okay, but then again ping is not too demanding of a task.

The biggest confusion I have is that the FTP always works (both in u-boot and when running Linux after an SD boot), and that NFS actually works on a rare occasion when done with u-boot.

 

Has anyone else had problems like this?  Any suggestions on what I can do to further troubleshoot?

 

Thanks!

 

- Matt

Tags (1)
8 Replies

3,382 Views
MickeyI
Contributor III

In case of a 'Connection Refused' error, the following additional mount parameters may help:

mount -o port=2049,nolock,proto=tcp nfs_server:/server/mount/point  /mnt/nfs

3,382 Views
UnisvrTim
Contributor III

This solved my problem!

0 Kudos

3,382 Views
frostybeard
Contributor I

Have you checked your kernel configuration? ("make menuconfig" in your kernel source directory)

Check File Systems -> Network File Systems

 

It's possible NFS support is not compiled into your kernel.

0 Kudos

3,382 Views
daiane_angolini
NXP Employee
NXP Employee

I always use this http://www.imxdev.org/wiki/index.php?title=All_Boards_NFS_on_Ubuntu

 

to config my system. Can you, please, take a look if it´s ok for you?

 

you can also try to mount your exported folder into your PC (like /mnt) using your PC IP address. If you could not mount it even on your PC, that´s you have a disconfigured NFS server.

 

 

0 Kudos

3,382 Views
VikramU_ng
Contributor III
Can you see if you can access the share from another Linux system -wherein you mount the NFS store - and check if there any firewall/rules
0 Kudos

3,382 Views
Santosh_ng
Contributor I
Hi, I m trying to compile qt-everywhere for imx233 but  hv doubt that do I need to boot target with nfs or what? is qt uses target file system while compiling please help me, I tried to compile the qt with giving the soft link path to ltib/rootfs but its giving so many problems... please please reply me....

Vladan Jovanovic said:

Hi Matt,

 

first make sure that the NFS server is really running, then try to restart it :-)

 

You can post your NFS configuration file here so we can see if there's something wrong there as well.

 

vladan

 

 

 

0 Kudos

3,382 Views
AhmetYUCE
Contributor II
Hi Matt; I have similar problems like you, so far i had belived it's an HW issue, since MAC IC is not on the main board but on a detachable ethernet board with RJ45. I used the same custom u-boot and kernel on both iMX28EVK and my board. With iMX28 EVK, there is no problem, with my custom board results similar to yours. EVK's iMX287 processor has MAC addresses programmed into OTP and there could be some other options, will check the OTP values later on. By the way wireshark shows ethernet packages reaches to PC. Anyway, i'll revise the both main board and ethernet board HW soon, hope an improvement occurs. Regards Ahmet
0 Kudos

3,382 Views
VladanJovanovic
NXP Employee
NXP Employee

Hi Matt,

 

first make sure that the NFS server is really running, then try to restart it :-)

 

You can post your NFS configuration file here so we can see if there's something wrong there as well.

 

vladan

 

 

 

0 Kudos