Re: Experimental NFS server oddity
On Sep 11, 2010, at 5:26 PM, Rick Macklem wrote: On Sep 11, 2010, at 4:20 PM, Rick Macklem wrote: You can also look in /var/log/messages to see if any of the daemons are complaining about something. Only warning I see on a system reboot is: nfsd: can't open /var/db/nfs-stablerestart Creating this file and then rebooting the system seems to get things working. This file certainly wasn't required by the old nfsd. Should this file be created by /etc/rc.d/nfsserver at boot time (if it doesn't exist)? Or should it be created by installworld? Technically, it should only be created for a fresh install on a disk that has never been set up before. (ie. Not on an update/upgrade unless it has never existed before.) As such, I just documented it in man nfsv4 for now, This is going to bite people on upgrades since the old server didn't require this file, so people upgrading from the old nfsd are going to hit this problem pretty consistently. I'd like to at least consider alternatives to the current behavior; maybe one of the following? * If the file doesn't exist on startup, create it and warn loudly. * Similar to isc-dhcp, periodically make a a backup copy of the file and only create a fresh blank one if the file and backup are both missing. I think this might be a reasonable compromise. The kernel can signal the master nfsd (which remains in userland) to copy the file to a backup after it has been updated, then the backup can be used if the regular one is lost/corrupted. If neither exists, creating new ones seems reasonable. Other opinions? rick * make installworld is certainly capable of creating this file only if it doesn't already exist. (That doesn't cover the binary update case, of course.) ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Experimental NFS server oddity
I just tried adding nfsv4_server_enable=YES to my rc.conf and found that after I rebooted the server, my FreeBSD 8 client (still using NFSv3) couldn't connect because there was no RPC mapping for nfs. Did you specify both of these in rc.conf? nfs_server_enable=YES nfsv4_server_enable=YES You need to specify both of them (and nfsuserd=YES if you going to use NFSv4). See man nfsv4 for more. If you did specify both, then do a ps axHl to see what didn't start up. There should be: rpcbind mountd nfsd and for NFSv4 to work nfsuserd You can also look in /var/log/messages to see if any of the daemons are complaining about something. rick ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Experimental NFS server oddity
On Sep 11, 2010, at 4:20 PM, Rick Macklem wrote: I just tried adding nfsv4_server_enable=YES to my rc.conf and found that after I rebooted the server, my FreeBSD 8 client (still using NFSv3) couldn't connect because there was no RPC mapping for nfs. Did you specify both of these in rc.conf? nfs_server_enable=YES nfsv4_server_enable=YES You need to specify both of them (and nfsuserd=YES if you going to use NFSv4). See man nfsv4 for more. Both specified, as well as rpcbind_enable=YES If you did specify both, then do a ps axHl to see what didn't start up. rpcbind, mountd, and nfsuserd are all running, but nfsd is not running. You can also look in /var/log/messages to see if any of the daemons are complaining about something. Only warning I see on a system reboot is: nfsd: can't open /var/db/nfs-stablerestart Creating this file and then rebooting the system seems to get things working. This file certainly wasn't required by the old nfsd. Should this file be created by /etc/rc.d/nfsserver at boot time (if it doesn't exist)? Or should it be created by installworld? Tim ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Experimental NFS server oddity
On Sep 11, 2010, at 4:20 PM, Rick Macklem wrote: I just tried adding nfsv4_server_enable=YES to my rc.conf and found that after I rebooted the server, my FreeBSD 8 client (still using NFSv3) couldn't connect because there was no RPC mapping for nfs. Did you specify both of these in rc.conf? nfs_server_enable=YES nfsv4_server_enable=YES You need to specify both of them (and nfsuserd=YES if you going to use NFSv4). See man nfsv4 for more. Both specified, as well as rpcbind_enable=YES If you did specify both, then do a ps axHl to see what didn't start up. rpcbind, mountd, and nfsuserd are all running, but nfsd is not running. You can also look in /var/log/messages to see if any of the daemons are complaining about something. Only warning I see on a system reboot is: nfsd: can't open /var/db/nfs-stablerestart Creating this file and then rebooting the system seems to get things working. This file certainly wasn't required by the old nfsd. Should this file be created by /etc/rc.d/nfsserver at boot time (if it doesn't exist)? Or should it be created by installworld? Technically, it should only be created for a fresh install on a disk that has never been set up before. (ie. Not on an update/upgrade unless it has never existed before.) If this file is lost during a crash, the technically correct thing is to recover it from backups and not let the server start until it is recovered, since the information in it is critical to a correct reboot recovery of the NFSv4 state. So the answer is no for /etc/rc.d/nfsserver unless you don't care about correct server crash recovery. I don't know if installworld can differentiate between a fresh install and an upgrade? (I suppose it could create it if it doesn't already exist.) As such, I just documented it in man nfsv4 for now, rick ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Experimental NFS server oddity
On Sep 11, 2010, at 5:26 PM, Rick Macklem wrote: On Sep 11, 2010, at 4:20 PM, Rick Macklem wrote: You can also look in /var/log/messages to see if any of the daemons are complaining about something. Only warning I see on a system reboot is: nfsd: can't open /var/db/nfs-stablerestart Creating this file and then rebooting the system seems to get things working. This file certainly wasn't required by the old nfsd. Should this file be created by /etc/rc.d/nfsserver at boot time (if it doesn't exist)? Or should it be created by installworld? Technically, it should only be created for a fresh install on a disk that has never been set up before. (ie. Not on an update/upgrade unless it has never existed before.) As such, I just documented it in man nfsv4 for now, This is going to bite people on upgrades since the old server didn't require this file, so people upgrading from the old nfsd are going to hit this problem pretty consistently. I'd like to at least consider alternatives to the current behavior; maybe one of the following? * If the file doesn't exist on startup, create it and warn loudly. * Similar to isc-dhcp, periodically make a a backup copy of the file and only create a fresh blank one if the file and backup are both missing. * make installworld is certainly capable of creating this file only if it doesn't already exist. (That doesn't cover the binary update case, of course.) ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org