[news.software.b] Sharing news across NFS

dce@mips.UUCP (02/22/87)

In an effort to test NFS, widen news availability, and save some disk space
(our Super-Eagles are dying), I have set up some of our local machines
to share news across NFS.

I have implemented this as follows:

	1. /usr/spool/news is shared
	2. /usr/new/lib/news is shared, but seq and sys are symbolic
	   links to files in /usr/new/lib/news.local
	3. Only the machine that has the news disks actually gets
	   news from outside.

I originally tried to put all files to be shared in a directory called
usr/spool/news/shared, but the news software likes to unlink and rename
files, which doesn't work with symbolic links.

Anyway, I have a system that now works except for one thing that bothers
me: postings made on a sharing machine update /usr/spool/news and
/usr/new/lib/news/active. Since I use HIDDENNET, I can't set it up so
that the main feed just doesn't forward the news.

Is there any way for me to change it so that inews doesn't update the
active file? That is, without changing all of the various news posting
commands, can I tell inews to just send the news to rnews@mips without
saving a local copy?

It's not that bad currently; the news just gets refused when it gets
sent to the NFS base machine, and it does mean that new articles
are available on all of the sharing machines as soon as they are
posted. It just seems like a mess.
-- 
			David Elliott

UUCP: 	{decvax,ucbvax,ihnp4}!decwrl!mips!dce, DDD:  	408-720-1700

mcooper@usc-oberon.UUCP (02/22/87)

I'm not sure what your problem is.  We have a similiar setup here.
News arrives from the outside world onto oberon - a VAX 750 running
4.3BSD+NFS (from Mt. Xinu).  Our spool directory is /usr/spool/news.
Our "lib" directory is /usr/lib/news which is a link to
/usr/spool/news/lib.  All 4.3BSD+NFS VAXen wishing to read news, simplying
have to mount oberon's /usr/spool/news, create a link for /usr/lib/news,
and use whatever regular news reading programs they wish (most use rn).

Our inews is not compiled with HIDDENET.  Since almost all of
/usr/spool/news is writable by group "news", the inews on the client
machines have no problem writing /usr/spool/news/.rnews (we have
SPOOLNEWS defined).  When the articles are processed by rnews -U
at a later time, inews places the correct Path: information in
place.  The From: line is the original client host the article was
posted on.  As far as inews is concerned, the article could have
arrived via UUCP for all it cares.

We also have a mixed environment of NFS machines.  Most of our Sun
systems, mount oberon's /usr/spool/news.  The setup is basically the
same for the VAXen, except instead of linking /usr/lib/news to
/usr/spool/news/lib, they link to /usr/spool/news/lib.sun.  This
directory contains mostly links to important files (like "active")
in /usr/spool/news/lib/*.  The only "real" file is a Sun binary
of inews.

There is a growing number of hosts using oberon's spool directory.
So far, the load on oberon has been fairly light.  The only exception
being when someone does a find on a client host of /usr/spool/news.
It's a big win being able to offer news to so many machines and at
the same time only have to worry about maintaining the software on
*one* machine.

			mike
-- 
Michael A. Cooper, University Computing Services, U of Southern California
  UUCP: {sdcrdcf, uscvax}!usc-oberon!mcooper  BITNET: mcooper@uscvaxq
  ARPA: mcooper@usc-oberon.USC.EDU            PHONE: (213) 743-3462

jonab@SDC-CAMARILLO.ARPA.UUCP (02/23/87)

In article <185@quacky.mips.UUCP> dce@quacky.UUCP (David Elliott) writes:
>I have implemented this as follows:
>
>	1. /usr/spool/news is shared
>	2. /usr/new/lib/news is shared, but seq and sys are symbolic
>	   links to files in /usr/new/lib/news.local
>	3. Only the machine that has the news disks actually gets
>	   news from outside.
>
>Is there any way for me to change it so that inews doesn't update the
>active file? That is, without changing all of the various news posting
>commands, can I tell inews to just send the news to rnews@mips without
>saving a local copy?
>

Here is what I did with our collection of Suns:

I set up /usr/spool/news and /usr/lib/news to be shared via nfs, but I
don't define HIDDENNET.  Instead, I replace /usr/lib/news/inews with the
following shell script:

#!/bin/sh
if [ `hostname` = sdcjove ]; then
	/usr/lib/news/inews.real "$@"
else
	rsh sdcjove /usr/lib/news/inews.real "$@"
fi

Where sdcjove is the name of my main news machine.  All news is forwarded
to sdcjove where it is posted normally.

Jon Biggar
sdcrdcf!jonab
jonab@CAM.UNISYS.COM

chuq@plaid.UUCP (02/23/87)

In article <185@quacky.mips.UUCP> dce@quacky.UUCP (David Elliott) writes:
>In an effort to test NFS, widen news availability, and save some disk space
>(our Super-Eagles are dying), I have set up some of our local machines
>to share news across NFS.
>
>I have implemented this as follows:
>
>	1. /usr/spool/news is shared
>	2. /usr/new/lib/news is shared, but seq and sys are symbolic
>	   links to files in /usr/new/lib/news.local
>	3. Only the machine that has the news disks actually gets
>	   news from outside.
>
>I originally tried to put all files to be shared in a directory called
>usr/spool/news/shared, but the news software likes to unlink and rename
>files, which doesn't work with symbolic links.
>
>Anyway, I have a system that now works except for one thing that bothers
>me: postings made on a sharing machine update /usr/spool/news and
>/usr/new/lib/news/active. Since I use HIDDENNET, I can't set it up so
>that the main feed just doesn't forward the news.

The easiest thing to do is simply not export inews -- it doesn't deal
well with networked reality in a number of places.

What we do is use NFS to read news -- /usr/lib/news becomes
/usr/spool/news/lib (with an appropriate symlink if you want it) and the
binaries are in /usr/spool/news/bin -- that way you have a single NFS mount
point.  We also mount this read-only for reasons I'll mention in a minute.

To do remote postings, we use NNTP from Berkeley, which works fine.  Both
Pnews and Postnews work that way.  You should also be able to do remote 
posting by turning inews into a shell script that does an 'rsh <server> inews'
but I haven't played with that a lot.

The reason you want to use something like NNTP and a read-only file system
is to make sure that people are running up-todate software.  We had
continuing problems with people running 2.10.1 or 2.10.2 news on our system
long after we'd upgraded to 2.11.  Since the active file formats aren't
compatible, news kept getting mucked up.  Setting the filesystem read only
and using NNTP allows you to protect the critical files from accidental harm
while still giving you full functionality.

chuq
Chuq Von Rospach	chuq@sun.COM		[I don't read flames]

There is no statute of limitations on stupidity

gww@beatnix.UUCP (02/23/87)

In article <185@quacky.mips.UUCP> dce@quacky.UUCP (David Elliott) writes:
>In an effort to test NFS, widen news availability, and save some disk space
>(our Super-Eagles are dying), I have set up some of our local machines
>to share news across NFS.

Maybe it's a good test of NFS, but are you aware of nntp/nntpd/rrn. It's a
fine way of having a single system with /usr/spool/news and allowing other
systems to read and submit news.  I've been using it at ELXSI for a number
of months and have been very happy with it.  It is available on the 4.3BSD
distribution in the user contributed software, or from Phil Lapsley
(phil@ucvbax.berkeley.edu, ...!ucbvax!phil).  Phil was going to make another
distribution over the holidays, but appearently didn't get it done.

There were a couple bugs in the 4.3 distribution that I've fixed and I've 
brought my copy of rrn up to date with the latest patches to rn.  Phil would
have the best copy, but I'd be happy to share my mods.  (I've already done
so to Phil).

Gary..
{styx,ucbvax!sun,altos86,bridge2}!elxsi!gww

dce@mips.UUCP (02/24/87)

I'll try to clarify the situation a little.

I have 5 Mips M/500s that share news, but the main news feed is not one
of them. Here's a picture:

	prls <-> mips <-> {quacky,winchester,charlie,obiwan,klinger}

The news spool and library directories are all on quacky (mips is a
780 that isn't running NFS).

The problem I am having is that when news is posted from, for example,
obiwan, the news is immediately posted, writing to quacky's spool
directory and changing quacky's active file, and is sent to mips.
Mips turns around and sends the file to quacky, where it is rejected
because it is already in the news system. It isn't a big deal; it just
seems somewhat messy.

Someone mentioned that I should change inews on the 4 slave machines
to execute 'rsh mips inews ...' so that my 'Reply-To:' field would
say 'dce@mips.UUCP' instead of the dreaded 'dce@quacky.UUCP'. This
actually doesn't work, since the program that generates the 'Reply-To:'
field is Pnews, which hasn't been taught about HIDDENNET. If I use
postnews, no 'Reply-To:' is generated, and all other parts of the
header refer to mips!dce, except for the article ID number.
-- 
			David Elliott

UUCP: 	{decvax,ucbvax,ihnp4}!decwrl!mips!dce, DDD:  	408-720-1700

earle@smeagol.UUCP (03/04/87)

[I emailed this to David Elliot, but after seeing subsequent repsonses,
 thought perhaps others might find it instructive ...]

	I am using NFS to share Netnews here on my Sun net (currently 10
machines are sharing news, with an 11th due up shortly).  I don't
understand what the problem is; I am doing exactly what you want
(I'm guessing!) to be doing, and I have no problems doing it ...
My scheme is:

(1) Gigantic users partition on my Eagle (/usr2), with most of that
taken up by Netnews under /usr2/news. /usr2 is NFS mounted rw everywhere.

(2) /usr/spool/news is a symlink on the news server (this machine, smeagol).
I hardcoded /usr2/news into some of the Netnews config files to make things
easier.  Since I just got a Super Eagle in to add on to the existing Eagle,
I will probably make a seperate /usr/spool/news partition, remake Netnews,
and NFS mount that partition everywhere as well.

(3) /usr/lib/news is NFS mounted everywhere, rw.  Thus, access to inews.

(4) /usr/local/bin NFS mounted everywhere, and I put the news reading/posting
programs there (postnews, vnews, rnews, checknews, readnews).  The ones that
need to be elsewhere (on smeagol) for PATH reasons I made hard links to
(like /usr/bin/rnews <-> /usr/local/bin/rnews) on the server.

(5) I have my machine defined as `ME' in the sys file instead of `smeagol'.

(6) I also have HIDDENNET defined.

I may be overlooking something here, but this works just fine for me.  Not
that I post things very often, but I've posted from both smeagol and other
machines and everything looks the same and it works OK ... (only difference is
articles from my other machines get Message-ID's like
<16231@othermachine.smeagol.JPL.NASA.GOV>, not too horrible)

Under 2.11, it seems that defining your system to be `ME' in sys instead of
the newsfeed gateway, seems to automagically solve the old problem of the
news wanting to see an entry for your non-news-gateway machine (that you
are posting from) in `sys'.  If you put one in there to `fix' that,
then it tried to send the article back to you, because of the stupid dual
purpose nature of `sys' (i.e. what & where can I post to/from, also what
machines to send news to).  As I said, using `ME' seems to solve this
problem when posting from other machines in your net.  I don't have to do 
anything with making `seq' and `sys' be symlinks; are you running 2.11?  
Doing things this way also keeps the non-news-gateway machine from updating
/usr/spool/news and the active file.

Summary:  See what you are doing that is different to the above.  If you
are running 2.11, I think using `ME' instead of `mips' will solve your 
main problem (only problem?).




-- 
	Greg Earle	UUCP: sdcrdcf!smeagol!earle; attmail!earle
	JPL		ARPA: elroy!smeagol!earle@csvax.caltech.edu
AT&T: +1 818 354 4034	      earle@jplpub1.jpl.nasa.gov (For the daring)
Is this an out-take from the ``BRADY BUNCH''?