Messages in this thread | | | Date | Tue, 03 Aug 2004 12:33:03 +0200 | From | Frank Steiner <> | Subject | Problem: nfsd producing stales when restarting too fast |
| |
Hi,
there seems to be a problem with the kernel nfsd on 2.6.7 when restarting the server too fast. I'm running 2.6.7 on both NFS server and client.
I've mounted two test volumes, both with -orw,nfsvers=3,rsize=8192,wsize=8192,hard,intr,nolock Using soft or hard and udp or tcp does not make any difference.
On the client that mounts the volumes (subdirs udp and tcp) I run loops like "while true; do date >> udp/bla; done"
Restarting the nfsserver with "/etc/init.d/nfsserver restart" (sometimes a few times, somtimes on the first try) ends up with both loops echoing "bash: udp/bla: Stale NFS file handle" forever. But when I shutdown the nfsserver, wait 5 seconds and bring it up again, this never happens. And it does even bring back the loops to normal behaviour when they were stuck on stale fs before.
Ok, it seems that you just need to insert a sleep statement in the init script, but I guess this is not the desired behaviour of the nfs daemon.
Btw, it's not a problem with the init script, I can also produce this behaviour manually by /usr/sbin/exportfs -au killall -9 nfsd killall -9 /usr/sbin/rpc.mountd [sleep 5] /usr/sbin/exportfs -r /usr/sbin/rpc.nfsd /usr/sbin/rpc.mountd
Without the sleep, everything stales. With the sleep, it works fine.
cu, Frank
-- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |