Article View: news.software.nntp
Article #69Re: NFS questions
From: Larry Parmelee
Date: Mon, 22 Aug 1988 15:21
Date: Mon, 22 Aug 1988 15:21
101 lines
4587 bytes
4587 bytes
I've set up our local hosts to run news via a sun NFS shared file system.
We've got a mixture of vaxen runing MtXinu unix and Sun 2s, 3s, and 4s
running Sun OS 3.5.
The setup here is as follows: One of the vaxen has a /usenet file system,
which it exports. A rough layout of /usenet is:
/usenet/bin/* - News reader programs, shell scripts.
/usenet/lib/news/* - the usual /usr/lib/news stuff
/usenet/spool/news/* - the articles (/usr/spool/news stuff)
We encourage our users to use only Larry Wall's "rn" program for their
news-reading. The advantage of this is that most of the auxillary programs
are shell scripts which run equally well on the vaxen or the suns.
On the systems which import /usenet, /usr/lib/news and /usr/spool/news
are symbolic links which point to the appropriate points on the
/usenet filesystem. In /usr/local (or whereever you usually put your
news executeables) there is a bunch of mini-shell scripts which just
exec the appropriate program from /usenet/bin. I use shell scripts
rather than symbolic links for the executeables because the importers
behave better should the system exporting /usenet be down.
This isn't too much of a burden, since only 2 different scripts are
needed, and hard links can be created between the various names.
For the news shell scripts, like Pnews, Rnmail, newsetup, and newsgroups,
the dummy shell script in /usr/local is just this:
#! /bin/sh
case "$#" in
0) exec /usenet/bin/`/usr/bin/basename $0` ;;
*) exec /usenet/bin/`/usr/bin/basename $0` "$@" ;;
esac
For the rn program itself, since this is an executeable which must be
different for each of the various machine architectures, /usenet/bin
contains several different "rn"s, denoted "rn.{vax,sun{2,3,4}}". The
dummy shell script in /usr/local for "rn" is as follows:
#! /bin/sh
B=/usenet/bin/rn
if ls -l /usr/include/machine | grep -s 'vax' ; then
N="$B".vax
else
N="$B".`arch`
fi
case "$#" in
0) exec "$N" ;;
*) exec "$N" "$@" ;;
esac
Probably I should have just created an "arch" command on the vaxen, which
would have simplified the above.
The above suffices for news reading. The next trick was to get posting
to work. For that, I used nntp. Nntp comes with a dummy
"inews" program, so /usenet/lib/news contains a bunch of versions of
inews, "inews.{real,sun{2,3,4},vax}" Note the addition of "inews.real".
This is the "real" news version of inews, and thus it can be used only
on the machine that owns the /usenet filesystem. All the other inets
are the NNTP dummy inews. In place of "inews", I have the following
shell script, which selects the proper inews to use on a given machine.
Again, creation of an "arch" command on the vaxen would simplify this.
#! /bin/sh
# find echos $B iff $B is not on an NFS filesystem.
B=/usenet/lib/news/inews
N=`find "$B" -fstype 4.2 -print`
if [ "X$N" = "X$B" ] ; then
N="$B".real
else
if ls -l /usr/include/machine | grep -s 'vax' ; then
N="$B".vax
else
N="$B".`arch`
fi
fi
case "$#" in
0) exec "$N" ;;
*) exec "$N" "$@" ;;
esac
I've probably forgotten some (hopefully minor) details. This seems
to work quite well for us. We've been using this setup for about 4
months now. Several things to note: The /usenet file system is huge
(/usr/spool hasn't over-flowed since I set this up!!!) and also used
for uucp. The system exporting /usenet is a microvax II, more-or-less
dedicated to news and uucp purposes, with only a few occasional users.
Nonetheless, loads on the system are usually very reasonable. This
host also feeds news to several other campus news leaf nodes on
an after-hours basis (not via nntp), and exchanges nntp news with
four other sites all the time. The startup delay due to the shell
script indirection, NFS, etc is negligible.
-Larry Parmelee
parmelee@cs.cornell.edu
cornell!parmelee
Technical Details
Message-ID:
<20405@cornell.UUCP>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!cornell!parmeleeReferences:
<583@paris.ICS.UCI.EDU>Show Full Headers
Complete Article Headers
Message-ID: <20405@cornell.UUCP> Subject: Re: NFS questions Date: Mon, 22 Aug 1988 15:21:57 +0000 From: parmelee@wayback.cs.cornell.edu (Larry Parmelee) References: <583@paris.ICS.UCI.EDU> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!cornell!parmelee Newsgroups: news.software.nntp Sender: nobody@cornell.UUCP Reply-To: parmelee@wayback.cs.cornell.edu (Larry Parmelee) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 100