🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #74287

Re: Renaming a newsgroup

#74287
From: Jeffrey M. Vinocur
Date: Tue, 26 Sep 2006 23:20
221 lines
10584 bytes
In article <kGbOg.40791$QM6.16542@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>1.
>
>After rebuilding the history and overview on the news2 server, I 
>discovered that the history.hash and the history.index had grown by 100 
>times the original size. Below shows the backed-up (*.orig) files for 
>comparison with the new ones.
>
>-rw-rw-r--   1 news news  3939763 2006-09-13 00:31 history
>-rw-rw-r--   1 news news       51 2006-09-13 00:31 history.dir
>-rw-rw-r--   1 news news       85 2006-09-03 02:20 history.dir.orig
>-rw-rw-r--   1 news news 60000000 2006-09-13 00:31 history.hash
>-rw-rw-r--   1 news news   652800 2006-09-03 01:45 history.hash.orig
>-rw-rw-r--   1 news news 40000000 2006-09-13 00:31 history.index
>-rw-rw-r--   1 news news   435200 2006-09-03 01:45 history.index.orig
>-rw-rw-r--   1 news news  5321295 2006-09-03 01:46 history.orig


>Any idea why these files grew so large after makehistory completed 
>(using "makehistory -b -f history.n -I -O")?

That is weird.

The index structures can always grow to accomodate an enlarging
history, but efficiency is best when they are preallocated to an
appropriate size.  So the code underlying makehistory/makedbz has
a number of options for guessing or allowing you to configure
this size (see the manpages for those two utilities).

It looks like your index files are over-allocated.  I'm not sure
why that occurred in the first place, but a quick makedbz run
should rebuild them at a more appropriate size.  You can run 
`wc -l history` to get an idea of how many articles you have at
present (assuming you trust your history file, or I guess
something like `find -type f -print | wc -l` in the spool
otherwise), and give that number as an approximate size with the
-s flag to makedbz.


You ask elsewhere in the post if you need to run makedbz.  I'm
always a little vague on that, because depending on the version
of INN, sometimes makehistory managed to do everything itself,
and sometimes makedbz was required afterwards.  When you finish a
makehistory run, if the timestamps on your .dir/.index/.hash
files are just as fresh as the history file itself (as they are
in your example above), then I would expect that makehistory has
just caused them to be regenerated.


>Additionally, expireover took 28 minutes yesterday (Wednesday) morning 
>for news2, usually taking around 35 seconds at most. Expiration is not 
>used for these groups ("*:A:never:never:never). This was a report for 
>the past 11 days since this server has been shut off (Daily Usenet 
>report from Sep 3 01:43:56 to Sep 13 00:00:03).

That's weird.  I wonder if your new history file index structures
are somehow so large they are inefficient to access.  Let's come
back to this if it persists when everything else is cleared up.


>The "Article lines processed 80930" looks double what it should be. 
>Perhaps it was reading the backup spool "~/archive/articles" within the 
>archive directory? Or the history database for the previous and current 
>groups, or active (when this nightly expiration ran, I hadn't yet 
>removed the old non-xanadu.oldgroups from active, although I did move 
>them to archive.)

Well, it's processing article lines in the history file there, so
that's the place to investigate.  You didn't use -a with
makehistory, I presume.  Perhaps you still somehow ended up with
duplicate files within spool/articles/ itself (it wouldn't have
read anything in spool/archive/articles/), or duplicate entries
in the history file (which would probably now have been cleared
up after generating thousands of lines in your news.notice log
file if you want to take a quick peek).


>2.
>
>I also had considerable trouble with oldgroup-to-newgroup renaming. 
>Message counts were not the same as they were before running the 
>renamer.pl script.

Message counts in the active file / overview database, or files
physically missing from disk?


>After examining several headers of articles in the spool, I discovered 
>headers which appeared as "xanadu.xanadu.brisbee" etc. It may have been 
>contributed to what Dr.Ruud discovered.

I suspect you inadvertently ran the script twice on the same
files, since that would have given exactly this symptom.  Each
time the script scans the file, it seels the "brisbee" part
(which matches what you supply for the oldgroup argument) and
adds the xanadu. as you directed.


>3.
>
>I am satisfied the spool now has correct header information, but despite 
>several different runs of makehistory, including deleting the overview 
>files first, I cannot get the raucouscaucus group to show any articles 
>(it does appear as a group, but with zero articles in a news reader).
>
>xanadu.raucouscaucus 0000000239 0000000240 y

Okay, this (along with the fact that playing with the watermarks
didn't fix it) means you need to check for problems with
overview.  Your almost certainly using tradspool, which means you
should look in spool/overview/x/r/ for the appropriate .DAT file.
(The files are organized by the initials of the components of the
newsgroup name, if you get what I mean.)

There should be one (very long) line per article in the group.
Each line starts with the article number and then has all of the
fields listed in your overview.fmt (separated by tabs).

(Look at a group that's working okay for comparison.)

Do you find a completely empty .DAT file for this group?  I
suspect you may.


>By the way, the default "ctlinnd renumber" or "ctlinnd renumber all" 
>will not work as indicated in ctlinnd(8) to scan all groups:

I don't understand what you mean by not working here.  I've
certainly used this functionality in the past.


>I have throttled and stopped the server several times, deleted the 
>overview directory files (rm -r /var/spool/news/overview/*), ran 
>"makehistory -b -f history.n -I -O", renamed the four history files to 
>remove the ".n" (the "mv history.n.* history.*" also will not work), 
>restarted the server, and I still have no raucouscaucus articles.

Oh wait, I wonder if you've got in some silly cycle by using the
-I flag to makehistory.  I never use that flag and would never
recommend it except for the very specific circumstance described
in the manpage.  So if your .DAT file is empty as I predicted
above, then try repeating the rebuild as you were doing but
without the -I flag.


And no, `mv history.n.* history.*` does not work; it's simply not
the semantics of the unix shell.  But that's a conversation for
another day.


>then tried the "ctlinnd renumber raucouscaucus" with no changes other 
>than the low-watermark increases to one more than the high-watermark -- 
>i.e. xanadu.raucouscaucus is still "empty" in a news reader.


>All other groups appear normal, both in displayed message count equals 
>the actual file count in the spool, and in the header newsgroup names 
>for Newsgroups|Followup-To|Xref. I suspected but could not find any 
>extra characters (i.e. spaces) in the xanadu.raucouscaucus group name in 
>the headers of the messages in the spool. There might be an invisible 
>(<CTRL>) character, but I don't know how to locate one, other than 
>trying to rename the group again, using a carefully-typed 
>"xanadu.raucouscaucus" as the oldgroup name. If it didn't fly, then 
>there must be something there that doesn't match the active file entry.

Well, there are two possibilities for this empty-appearing group.
One is that there is no overview entry (I think this is more
likely as discussed above).  In that case, there probably is a
perfectly good history entry, and you could check this by running

   grephistory '<RumorMill--119937207333182048@mkc-65-28-28-81.kc.rr.com>'

and seeing if you get a storage token back.  If you do, you could
pass it to the sm utility and hopefully get the article.  If that
works, then it's definitely an overview issue.  (The other
possibility is that there's something wrong with your active
file, but I think less likely.)


>Another thought: Is makedbz required after running this renamer.pl and 
>on a tradspool storage method, and if so, before or after makehistory?

As I was alluding to much above, makedbz is required any time you
make any changes to the history file, either manually or with
makehistory.  Except that nowadays I believe that makehistory
automatically runs the makedbz routines after each rebuild.


>xanadu.raucouscaucus 0000000239 0000000240 y

>group xanadu.raucouscaucus
>211 0 0 0 xanadu.raucouscaucus
>listgroup xanadu.raucouscaucus
>411 No such group xanadu.raucouscaucus
>quit
>205 .
>Connection closed by foreign host.
>
>That 411 message is some kind of flag I'm sure.

I forget what version of INN you're running, but I wonder if that
might be a subtle (and irrelevant) bug that has since been fixed.
Do you see the same behavior with other empty newsgroups?  Here's
mine for comparison:

200 news.litech.org InterNetNews NNRP server INN 2.4.3 ready (posting ok).
list active net.test
215 Newsgroups in form "group high low flags".
net.test 0000000606 0000000607 y
..
group net.test
list211 0 0 0 net.test
listgroup net.test
211 0 0 0 net.test


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <efccjh$cvc$3@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!199.218.7.141!news.glorb.com!news.litech.org!not-for-mail
References: <AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net> <ee6nbc$pv6$1@puck.litech.org> <NpCNg.117971$5i3.30183@bgtnsc04-news.ops.worldnet.att.net> <kGbOg.40791$QM6.16542@bgtnsc05-news.ops.worldnet.att.net>

Show Full Headers
Complete Article Headers
Message-ID: <efccjh$cvc$3@puck.litech.org>
Subject: Re: Renaming a newsgroup
Date: Tue, 26 Sep 2006 23:20:17 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net> <ee6nbc$pv6$1@puck.litech.org> <NpCNg.117971$5i3.30183@bgtnsc04-news.ops.worldnet.att.net> <kGbOg.40791$QM6.16542@bgtnsc05-news.ops.worldnet.att.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!199.218.7.141!news.glorb.com!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 221
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1159312817 13292 66.218.0.75 (26 Sep 2006 23:20:17
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Tue, 26 Sep 2006 23:20:17 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)