nfs bug & df: Can I lock up my kernel and overflow this buffer?

Billy Newsom billy at nlcc.us
Tue May 10 15:16:22 PDT 2005


Jonathan Noack wrote:
 >> Anyone tried that sort of stuff in fstab?  I'm a little skeptical.
 >
 > I use "that sort of stuff" and have for a long time.  Here's one of my
 > fstab lines:
 >
 > optimator:/usr/home  /usr/home  nfs  rw,-3,-T,-r=32768,-w=32768  0  0
 >
 > It's obvious you don't believe me but why are you unwilling to try it
 > yourself?

Well, because this fails to work on the commandline:

#mount -o -s -x 2 -T dell:/nfs /dellbak

I tried tons of different ways, never could get mount to do that, so I 
gave up on fstabbing options.

Since the above mount command wouldn't even work, I figured I could 
forget about putting those same options (which mount calls illegal) in 
the fstab file.  That's where the man pages only go so far.  Without the 
examples you give, I was pretty sure that it was pointless to get fstab 
options to do what mount wouldn't.

What it boils down to is that mount is fine with these options in fstab, 
but barfs when doing them on the commandline.  That was so 
couter-intuitive, I went around it for the sake of getting things done.

FreeBSD man pages are nice and all, but without a textbook siting by 
with some examples, it can be difficult.  I learned Unix pretty much ad 
hoc, so I find that examples (such as you gave) are worth much more than 
man pages now that I know most of the basics.

Thanks.

But what I did discover is that if I mount the same nfs resource 
multiple times, I get multiple, identical mounts (using fstab options, 
or commandline, either one).  I have to umount each one serially.  How 
is this a feature?  What good does it do me if I mount the same nfs 
drive to the same place n times?  Won't that eventually cause a deadlock 
as n increases beyond a few hundred or thousand? -- especially when the 
NFS server goes down?  Shouldn't the second and subsequent mounts either 
fail or not be attempted due to a sanity check?

#mount /usr
mount: /dev/ad0s1f: Device busy
Exit 1

That seems reasonable for /usr.  But as I stated before, NFS resources 
nevere apparently become "busy", and there is no sanity check to prevent 
mulitiple simultaneous mounts of identical file systems on identical 
file trees.



More information about the freebsd-stable mailing list