I've been trying to make some sense of the "NFS locking" issue. I am trying to run # make installworld DESTDIR=/mnt where /mnt is an NFS mount on a FreeBSD 4.11 server, but I am unable to get past a call to `lockf`. On this mailing list I've seen a thread starting with this message: http://lists.freebsd.org/pipermail/freebsd-stable/2006-August/027561.html and elsewhere I've seen this thread: http://www.gatago.com/mpc/lists/freebsd/stable/21851805.html The gist seems to be that rpc.lockd is badly behaved and broken and nobody knows how to fix it. So, in case my experience is any help, here is what I can report. 1. I have installed a fresh installation of FreeBSD 6.1 from the CD, 6.1-RELEASE-i386-disc1.iso, and have run `cd /usr/src; make buildworld; make buildkernel` successfully (takes nearly 8 hours, but then it is a fanless machine). The full distribution (as installed by sysinstall) is present, but nothing else. 2. Intending to experiment with network booting, I've attempted `make installworld DESTDIR=/mnt`, where /mnt is an NFS mount point on my master server, running FreeBSD 4.11-RELEASE-p11. 3. This fails when invoking lockf. To work around this, I have started rpc.lockd on the 4.11 server and configured all of the following lines in rc.conf: rpcbind_enable="YES" nfs_client_enable="YES" rpc_lockd_enable="YES" rpc_statd_enable="YES" 4. Now here is the behaviour: # mount $MY_SERVER:$MY_PATH /mnt # lockf /mnt/test ls This works just fine # cd /usr/src; make installworld DESTDIR=/mnt This hangs in lockf, and is unkillable (even `kill -9` is no good, and ps shows state = D+). So let's start another shell (Alt-F2): # lockf /mnt/test ls Also hangs. Rebooting the test machine clears the problem, returning to the state at the start of point (4), and the problem is completely repeatable in my configuration. Some observations: - Hanging in "uninterruptible sleep" is not good. No doubt it's quite possible that my 4.11 server has a broken rpc.lockd (or maybe I've not configured it right: I just started rpc.lockd, rather than restarting the server), but the behaviour of 6.1 is exceptionally unfriendly. In particular, unkillable processes look like outright bugs to me. - The conversation on mpc.lists.freebsd.stable (and elsewhere) looks alarming. I get the impression that this part of FreeBSD 6.1 is really rather broken and that there's no real sense of what to do about it. I hope I've sent this mail to the right place and that it's of some help.
On Sun, Aug 27, 2006 at 11:24:13AM +0000, Michael Abbott wrote:> I've been trying to make some sense of the "NFS locking" issue. I am > trying to run > # make installworld DESTDIR=/mnt > where /mnt is an NFS mount on a FreeBSD 4.11 server, but I am unable to > get past a call to `lockf`.I have not closely followed the discussion, as I have not experienced the problem. I am currently running FreeBSD6 based fileservers in an environment that includes FreeBSD, Linux (multiple flavors), Solaris, and Irix clients, and have experienced no nfs locking issues (I have one occasional problem with 64-bit Linux clients, but it is not locking related and appears to be due to a 64-bit Linux problem). Further, (though there may well be problems with nfs locking) I cannot recreate the problem you described -- at least in a FreeBSD6 environment. I have just performed a test of what you describe, using 'smbtest' (6.1-STABLE #17: Fri Aug 25 12:25:19 CEST 2006) as the client and 'data-2' (FreeBSD 6.1-STABLE #16: Wed Aug 9 15:38:12 CEST 2006) as the server. data-2 # mkdir /export/rw/bsd6root/ ## /export/rw is already exported via NFS smbtest # mount data-2:/export/rw/bsd6root /mnt smbtest # cd /usr/src smbtest # make installworld DESTDIR=/mnt [...] makewhatis /mnt/usr/share/man makewhatis /mnt/usr/share/openssl/man rm -rf /tmp/install.2INObZ3j smbtest # Which is to say that it completed successfully. Which suggests that there is not a serious and ongoing problem. There may well be a problem with FreeBSD4, but I no longer have any NFS servers running FreeBSD4.x, so I cannot confirm. Alternatively, there may have been a problem in 6.1-RELEASE that has since been solved in 6.1-STABLE that I am using. Or there could be a problem with the configuration of your server. Or there could be something else going on (in the network...?). But to see what exactly is happening in your case, you would probably want to look at what exactly is happening on the client, the server, and the network between them. -- greg byshenk - gbyshenk@byshenk.net - Leiden, NL
On Sun, Aug 27, 2006 at 11:24:13AM +0000, Michael Abbott wrote:> I've been trying to make some sense of the "NFS locking" issue. I am > trying to run > # make installworld DESTDIR=/mnt > where /mnt is an NFS mount on a FreeBSD 4.11 server, but I am unable to > get past a call to `lockf`. > > On this mailing list I've seen a thread starting with this message: > http://lists.freebsd.org/pipermail/freebsd-stable/2006-August/027561.html > and elsewhere I've seen this thread: > http://www.gatago.com/mpc/lists/freebsd/stable/21851805.html > > The gist seems to be that rpc.lockd is badly behaved and broken and nobody > knows how to fix it. So, in case my experience is any help, here is what > I can report. > > 1. I have installed a fresh installation of FreeBSD 6.1 from the CD, > 6.1-RELEASE-i386-disc1.iso, and have run `cd /usr/src; make buildworld; > make buildkernel` successfully (takes nearly 8 hours, but then it is a > fanless machine). The full distribution (as installed by sysinstall) is > present, but nothing else. > > 2. Intending to experiment with network booting, I've attempted > `make installworld DESTDIR=/mnt`, where /mnt is an NFS mount point on my > master server, running FreeBSD 4.11-RELEASE-p11. > > 3. This fails when invoking lockf. To work around this, I have started > rpc.lockd on the 4.11 server and configured all of the following lines in > rc.conf: > rpcbind_enable="YES" > nfs_client_enable="YES" > rpc_lockd_enable="YES" > rpc_statd_enable="YES" > > 4. Now here is the behaviour: > > # mount $MY_SERVER:$MY_PATH /mnt > # lockf /mnt/test ls > This works just fine > # cd /usr/src; make installworld DESTDIR=/mnt > This hangs in lockf, and is unkillable (even `kill -9` is no good, and ps > shows state = D+). So let's start another shell (Alt-F2): > # lockf /mnt/test ls > Also hangs. > > Rebooting the test machine clears the problem, returning to the state at > the start of point (4), and the problem is completely repeatable in my > configuration. > > > Some observations: > > - Hanging in "uninterruptible sleep" is not good. No doubt it's quite > possible that my 4.11 server has a broken rpc.lockd (or maybe I've not > configured it right: I just started rpc.lockd, rather than restarting the > server), but the behaviour of 6.1 is exceptionally unfriendly. In > particular, unkillable processes look like outright bugs to me. > > - The conversation on mpc.lists.freebsd.stable (and elsewhere) looks > alarming. I get the impression that this part of FreeBSD 6.1 is really > rather broken and that there's no real sense of what to do about it.Make sure that rpc.statd is running. For debugging purposes, tcpdump of the corresponding communications would be quite useful. Besides this, output of ps auxww | grep 'rpc\.' may be interesting. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060827/59c384f4/attachment.pgp