Date: Wed, 11 May 2005 01:10:40 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Billy Newsom <billy@nlcc.us> Cc: freebsd-stable@freebsd.org Subject: Re: nfs bug & df: Can I lock up my kernel and overflow this buffer? Message-ID: <20050510231040.GA4494@falcon.midgard.homeip.net> In-Reply-To: <428132B0.4060104@nlcc.us> References: <4280353B.8050306@leadhill.net> <42803B66.3070200@alumni.rice.edu> <428044C2.80208@leadhill.net> <428052CB.2000704@alumni.rice.edu> <428132B0.4060104@nlcc.us>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 10, 2005 at 05:16:16PM -0500, Billy Newsom wrote: > 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. Note that mount(8) (as well as mount_nfs(8)) says about the -o flag that "Options are specified with a -o flag followed by a comma separated string of options." If you try writing it as the manpage says, i.e. like mount -o -s,-x=2,-T dell:/nfs /dellbak it should work fine. > > 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. It works fine on the commandline, you just got the syntax for the commandline wrong. > > 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. Man pages often have some examples, but learning things only from manpages can indeed be a bit difficult. > > 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? It is a feature in that the system does exactly what you asked it to do. This is usually less painful than systems that try to guess what you actually meant. > What good does it do me if I mount the same nfs > drive to the same place n times? None that I can think of, which doesn't mean that there is no use for it. > Won't that eventually cause a deadlock > as n increases beyond a few hundred or thousand? -- especially when the > NFS server goes down? Probably not a deadlock, but possible a resource starvation - so don't do that. > 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. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050510231040.GA4494>