Date: Mon, 21 Aug 95 11:48:47 MDT From: terry@cs.weber.edu (Terry Lambert) To: peter@bonkers.taronga.com (Peter da Silva) Cc: hackers@freebsd.org Subject: Re: Making a FreeBSD NFS server Message-ID: <9508211748.AA26061@cs.weber.edu> In-Reply-To: <199508210345.WAA29762@bonkers.taronga.com> from "Peter da Silva" at Aug 20, 95 10:45:50 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> In article <9508201948.AA23045@cs.weber.edu>, > Terry Lambert <terry@cs.weber.edu> wrote: > >Unless you are running everything on the same box, it's impossible to > >provide inter-machine consistency guarantees. That's why NFS is the > >way it is. > > Oh, crap. You handle machine failures the same way you handle disk failures. > If you can't handle disk failures you shouldn't have a stateful *local* file > system. For conventional file I/O you can get pretty much the same recovery > semantics both ways (client reloads state), and for non-file I/O you get the > choice of no access at all or error returns. I'll take the error returns. Write me an NFS fsck. 8-). > I've used stateless and stateful remote file systems, and I'll take stateful > any day. I'd much rather type: > > tar tvfB //xds13/dev/rmt0 > > Than: > > rsh xds13 dd if=/dev/rmt0 | tar tvfb - > > And it's awful nice to be able to set up a getty on //modem1/dev/ttyc4. And > being able to get open-count semantics on temp files. And accessing named > pipes over the net. And "fsck //hurtsystem/dev/rw0a". And so on... > > I really miss OpenNET. Yeah, this isn't really a result of the statefulness or statelessness of the transport. It's that fact that NFS doesn't implement an ISO layer 5 or 6. OpenNet didn't implement a layer 5, but since you were going between homogeneous machine types for this type of I/O, that wasn't a problem (the manifest constants for B9600 for sgtty() were guaranteed to be the same). In point of fact, the partial open hack didn't work with modems over OpenNet, so you had to open without O_NDELAY and hope that you didn't lose carrier and that O_EXCL wasn't set on the port by a previous instance of getty (standard practice for uugetty). That's because you couldn't unset the O_NDELAY... they didn't have an fcntl() that would allow you to unset it. Since NFS uses the major/minor on a cdev or bdev locally rather than remotely, the devices don't transport. Of course, this is what enables NFS to support diskless systems, so you can't complain too loudly. Assuming a devfs that can be exported *not* as cdev/bdev nodes, the one issue is devices that are stateful based on open. Like rewind tape devices. To combat that, you maintain the open instance -- by asserting an NFS lock, which causes the lockd to convert the handle into an open fd in the lockd processes address space -- an open instance held for the duration of the lock on the remote system. The next biggie is to change devices into normal files using the devfs do that references are exported but device nodes instance are not locally used on the mounting machine. Problem solved. 8-). Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9508211748.AA26061>