View Full Version : NFS lockd on server-only machine - bug or feature?
Speedy
December 20th, 2008, 21:39
FreeBSD 6.4 lockd does not work when nfsclient is disabled in kernel configuration. It errors out saying "nfslock: no such file or directory".
Shouldn't there be at least a warning in kernel configuration file? :\
SirDice
December 21st, 2008, 11:37
It's missing a file or directory on your system. That's the error message. Has nothing to do with your kernel config.
Speedy
December 21st, 2008, 21:16
Thanks for response. I do not think you did read my post though.
FreeBSD 6.4 lockd does not work when nfsclient is disabled in kernel configuration.
Missing is device node /dev/nfslock. This node is created if "options NFSCLIENT" is set in kernel conf, and is not created if it's commented out. The error message in /var/log/messages is vague, that's true. It took a little headscratching before I figured out what's wrong.
Looking at the bright side, first time in years FreeBSD lockd is willing to respond to Linux NFS clients. Yea, I know, Linux has those NFS cookies with questionable length. Still, the problem was annoying.
I'd say the line in kernel config should look like this:
options NFSCLIENT # Dude, you need this if you want to use NFS locking
:P
SirDice
December 22nd, 2008, 07:57
I don't have it in my kernel config either. It gets loaded on the fly when needed.
dice@williscorto:~>kldstat
Id Refs Address Size Name
1 35 0xc0400000 456ad0 kernel
2 1 0xc0857000 12b8c if_ath.ko
3 3 0xc086a000 2ec28 ath_hal.ko
4 3 0xc0899000 2c19c wlan.ko
5 2 0xc08c6000 4138 ath_rate.ko
6 1 0xc08cb000 8754 snd_emu10k1.ko
7 3 0xc08d4000 4a55c sound.ko
8 1 0xc091f000 711edc nvidia.ko
9 3 0xc1031000 27414 linux.ko
10 1 0xc1059000 7f7c ng_ubt.ko
11 4 0xc1061000 d88c netgraph.ko
12 1 0xc106f000 dcc8 ng_hci.ko
13 3 0xc107d000 2bd8 ng_bluetooth.ko
14 1 0xc1080000 6a5d4 acpi.ko
15 1 0xc58d5000 7000 linprocfs.ko
16 2 0xc5b17000 36000 nfsclient.ko
17 1 0xc5bb4000 f000 nfslockd.ko
18 1 0xc5bc3000 10000 krpc.ko
19 1 0xc5bed000 1a000 ng_btsocket.ko
20 1 0xc5c11000 5000 vkbd.ko
21 1 0xc5c1c000 e000 fuse.ko
22 1 0xc6177000 7000 udf.ko
23 1 0xc6195000 b000 ntfs.ko
This is on 7-stable though. It's been a while since I used 6. But since 5 all /dev devices are created on the fly (devfs), not during install or build.
Speedy
December 22nd, 2008, 12:39
Yes, but that's not the point. I do not need nfsclient, so I built this box without this service/feature. And without any warning lockd refused to run. BTW, I build my boxes as lean as possible and do not build all the unnecessary kernel modules ("MODULES_OVERRIDE" variable in make.conf). So I had to rebuild my kernel to enable nfsclient.
I posted here because I wasn't happy this behaviour is undocumented, probably a bug. But I think it's wrong place for complaining about bugs.
$ kldstat
Id Refs Address Size Name
1 3 0xc0400000 367fd8 kernel
2 1 0xc0768000 61398 acpi.ko
As you see, not too many modules are loaded. ;)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.