From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10.1 Description of problem: I have two NFS file systems defined in /etc/fstab, on a box that is NIS client (important). They look something like this: 1.2.3.4:/foo /foo nfs rsize=8192,wsize=8192 0 0 1.2.3.4:/bar /bar nfs rsize=8192,wsize=8192 0 0 During boot, /foo fails to mount with an error stating that NFS server is down. /bar mounts fine. When machine is up and running, I can mount /foo manually by doing "mount /foo". If I change order in /etc/fstab (/bar first, /foo second), than /bar is the one that fails to mount. So it is always the first NFS mount point from /etc/fstab. Second, third, and so on always mount fine. It took me long time to figure out (with help from Fedora mailing list) what is going wrong. The box in question is NIS client. ypbind script is called *after* netfs script. If I change the order of scripts in /etc/rc?.d directories (first ypbind, then netfs) everything works fine. I used IP addresses in /etc/fstab, so theoretically even if no name services is available, everything should work. However, in this specific setup it doesn't. I don't know why. Is there reverse lookup happening during NFS mount? Some possible solutions could be: 1) reorder scripts in /etc/rc?.d so that netfs is called only after all name related services are up and running (ypbind for sure, I guess ldap and named too?). Of course, in this case those name services shouldn't have any data stored on NFS mount points defined in /etc/fstab. 2) Change timeout values so that mounts do not fail because name service is unavailable (when calling mount command? somewhere else?). 3) Remove/disable reverse lookup on IP addresses in /etc/fstab (if it is happening). Version-Release number of selected component (if applicable): initscripts-7.93.2-1 How reproducible: Always Steps to Reproduce: 1. define two or more NFS mount points in /etc/fstab on NIS client Actual Results: First mount point from /etc/fstab fails to mount with "server is down" error message. Expected Results: All mount points should mount correctly. The server is up, and IP addresses were used in /etc/fstab. Additional info:
Static IP?
Both client and the server have static IP address.
I'm guessing that if you add 'sleep 5' to the top of netfs, it works?
Created attachment 107051 [details] sleep 5 than nfs mount Ah, so my great theory falls apart. Sleep 5 does the trick. Is it needed for NFS only or for all the stuff in netfs? What I did for now was to add sleep 5 just before NFS mounts, not to slow boot process if there's no NFS mounts. As in attached patch. BTW, is this something specific for my installation (what? why?), or is this generic problem? Thanks for help.
It appears that when it tries to mount the first NFS share, it's still negotiating with the switch for link.
You could concievably fix this by adding: check_link_down ${REALDEVICE} to the end of the static networking init section in ifup.
Created attachment 107090 [details] add check_link_down to ifup script I've attempted to add check_link_down to ifup script as you suggested, and it didn't work. I've added one debugging echo to it, and by looking in log files after reboot, it seems that check_link_down was called only for lo interface, but not for eth0 interface. eth0 has static IP address, so I would expect that I added it to the right place (after line 407 in FC3 ifup script). I've inluded the patch with changes that I made.
Created attachment 107091 [details] fix for check_link_down You probably need this as well.
I've tried it out, still same results (error while mounting first file system). In log files I'm seeing "waiting for link on lo" (from my patch), but not on eth0. BTW, looking at your patch, it looks mostly as different formatting? I can't find any differences in the code?
In the previous version, if the link is 'UP' according to ifconfig, it skips the test entirely.
Hm, even after calling check_link_down and patching network-functions, it still doesn't work. I've added some debugging, so I know that check_link_down was called for my ethernet interface. check_link_down returns indicating that link is up. However netfs still fails to mount first file system. This is how I called check_link_down: # Wait for link if check_link_down ${REALDEVICE}; then echo $" failed; no link present. Check cable?" fi (maybe this should be part of ifup anyhow, it would only print warning during boot if cable is unplugged).
Fedora Core 3 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC5 updates or in the FC6 test release, reopen and change the version to match. Thank you!
There is NETWORKDELAY and LINKDELAY in the current development initscripts that may help to solve this for you. From sysconfig.txt: NETWORKDELAY=<delay in seconds> Delay in seconds after all network interfaces are initialized. Useful if network has spanning tree running and must wait for STP convergence. Default: 0 (no delay) LINKDELAY=<time in seconds> Time that the system should pause after the specific interface is enabled. This may be useful if one interface is connected to a switch which has spanning tree enabled and must wait for STP to converge before the interface should be considered usable.